From 9c1ece71a31093fcf4da4d4ab3368818f422cd64 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Thu, 11 Apr 2024 14:36:44 +0300 Subject: [PATCH] Show actual IO_ERROR message at VRML import. https://gitlab.com/kicad/code/kicad/-/issues/17727 (cherry picked from commit 97b15a17084569ee0c24ee66b729690396d0bf8a) --- plugins/3d/vrml/vrml.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/3d/vrml/vrml.cpp b/plugins/3d/vrml/vrml.cpp index ff8a7ee5b8..1b6a28a2c0 100644 --- a/plugins/3d/vrml/vrml.cpp +++ b/plugins/3d/vrml/vrml.cpp @@ -232,9 +232,11 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline ) // longer lines then perhaps it shouldn't be used modelFile = new FILE_LINE_READER( filename, 0, 8388608 ); } - catch( IO_ERROR & ) + catch( IO_ERROR& e ) { - wxLogError( wxS( " * " ) + _( "[INFO] load failed: input line too long\n" ) ); + wxLogError( wxString( wxS( " * " ) ) + << wxString::Format( _( "[INFO] load failed: %s" ), e.What() ) ); + return nullptr; }