Consistency in progress and error messages.

This commit is contained in:
Jeff Young 2021-06-26 12:33:37 +01:00
parent 3c81403424
commit 5c21f93803
30 changed files with 79 additions and 83 deletions

View File

@ -878,7 +878,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
#endif #endif
if( aStatusReporter ) if( aStatusReporter )
aStatusReporter->Report( _( "Loading 3D models" ) ); aStatusReporter->Report( _( "Loading 3D models..." ) );
loadModels( m_objectContainer, aOnlyLoadCopperAndShapes ); loadModels( m_objectContainer, aOnlyLoadCopperAndShapes );

View File

@ -641,7 +641,7 @@ void RENDER_3D_LEGACY::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
// Load 3D models // Load 3D models
if( aStatusReporter ) if( aStatusReporter )
aStatusReporter->Report( _( "Loading 3D models" ) ); aStatusReporter->Report( _( "Loading 3D models..." ) );
load3dModels( aStatusReporter ); load3dModels( aStatusReporter );
@ -881,9 +881,8 @@ void RENDER_3D_LEGACY::load3dModels( REPORTER* aStatusReporter )
// Display the short filename of the 3D model loaded: // Display the short filename of the 3D model loaded:
// (the full name is usually too long to be displayed) // (the full name is usually too long to be displayed)
wxFileName fn( model.m_Filename ); wxFileName fn( model.m_Filename );
wxString msg; aStatusReporter->Report( wxString::Format( _( "Loading %s..." ),
msg.Printf( _( "Loading %s" ), fn.GetFullName() ); fn.GetFullName() ) );
aStatusReporter->Report( msg );
} }
// Check if the model is not present in our cache map // Check if the model is not present in our cache map

View File

@ -410,15 +410,15 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayErrorMessage( nullptr, _( "Error loading editor" ), ioe.What() ); DisplayErrorMessage( nullptr, _( "Error loading editor." ), ioe.What() );
} }
catch( const std::exception& e) catch( const std::exception& e)
{ {
DisplayErrorMessage( nullptr, _( "Error loading editor" ), e.what() ); DisplayErrorMessage( nullptr, _( "Error loading editor." ), e.what() );
} }
catch( ... ) catch( ... )
{ {
DisplayErrorMessage( nullptr, _( "Error loading editor" ) ); DisplayErrorMessage( nullptr, _( "Error loading editor." ) );
} }
} }

View File

@ -309,12 +309,12 @@ FP_LIB_TABLE* PROJECT::PcbFootprintLibs( KIWAY& aKiway )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayErrorMessage( NULL, _( "Error loading project footprint library table" ), DisplayErrorMessage( NULL, _( "Error loading project footprint library table." ),
ioe.What() ); ioe.What() );
} }
catch( ... ) catch( ... )
{ {
DisplayErrorMessage( NULL, _( "Error loading project footprint library table" ) ); DisplayErrorMessage( NULL, _( "Error loading project footprint library table." ) );
} }
} }

View File

@ -463,8 +463,7 @@ void DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector( LIB_ID const& aLibId )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxLogError( wxString::Format( _( "Error occurred loading symbol %s from library %s." wxLogError( wxString::Format( _( "Error loading symbol %s from library %s.\n\n%s" ),
"\n\n%s" ),
aLibId.GetLibItemName().wx_str(), aLibId.GetLibItemName().wx_str(),
aLibId.GetLibNickname().wx_str(), aLibId.GetLibNickname().wx_str(),
ioe.What() ) ); ioe.What() ) );

View File

@ -724,7 +724,7 @@ bool DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow()
{ {
wxString msg; wxString msg;
msg.Printf( _( "Error occurred loading symbol %s from library %s.\n\n%s" ), msg.Printf( _( "Error loading symbol %s from library %s.\n\n%s" ),
id.GetLibItemName().wx_str(), id.GetLibItemName().wx_str(),
id.GetLibNickname().wx_str(), id.GetLibNickname().wx_str(),
ioe.What() ); ioe.What() );

View File

@ -129,8 +129,8 @@ bool DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow()
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayError( this, wxString::Format( _( "Error occurred loading global symbol library " DisplayError( this, wxString::Format( _( "Error loading global symbol library table."
"table.\n\n%s" ), "\n\n%s" ),
ioe.What() ) ); ioe.What() ) );
return false; return false;
} }

View File

@ -97,7 +97,7 @@ bool SCH_EDIT_FRAME::LoadProjectSettings()
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) ) if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) )
{ {
ShowInfoBarError( _( "Error loading drawing sheet" ), true ); ShowInfoBarError( _( "Error loading drawing sheet." ), true );
} }
return true; return true;
@ -268,7 +268,7 @@ SYMBOL_LIB_TABLE* PROJECT::SchSymbolLibTable()
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxString msg; wxString msg;
msg.Printf( _( "An error occurred loading the symbol library table '%s'." ), msg.Printf( _( "Error loading the symbol library table '%s'." ),
fn.GetFullPath() ); fn.GetFullPath() );
DisplayErrorMessage( NULL, msg, ioe.What() ); DisplayErrorMessage( NULL, msg, ioe.What() );
} }

View File

@ -427,7 +427,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
} }
catch( const std::bad_alloc& ) catch( const std::bad_alloc& )
{ {
msg.Printf( _( "Memory exhausted loading schematic file '%s'." ), fullFileName ); msg.Printf( _( "Memory exhausted loading schematic '%s'." ), fullFileName );
DisplayErrorMessage( this, msg ); DisplayErrorMessage( this, msg );
failedLoad = true; failedLoad = true;

View File

@ -78,8 +78,7 @@ public:
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxLogError( wxString::Format( _( "Error occurred loading symbol %s from library %s." wxLogError( wxString::Format( _( "Error loading symbol %s from library %s.\n\n%s" ),
"\n\n%s" ),
m_lib_id.GetLibItemName().wx_str(), m_lib_id.GetLibItemName().wx_str(),
m_lib_id.GetLibNickname().wx_str(), m_lib_id.GetLibNickname().wx_str(),
ioe.What() ) ); ioe.What() ) );

View File

@ -67,7 +67,7 @@ LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
{ {
if( aShowErrorMsg ) if( aShowErrorMsg )
{ {
wxString msg = wxString::Format( _( "Error loading symbol '%s' from library '%s'." ), wxString msg = wxString::Format( _( "Error loading symbol %s from library '%s'." ),
aLibId.GetLibItemName().wx_str(), aLibId.GetLibItemName().wx_str(),
aLibId.GetLibNickname().wx_str() ); aLibId.GetLibNickname().wx_str() );
DisplayErrorMessage( aParent, msg, ioe.What() ); DisplayErrorMessage( aParent, msg, ioe.What() );

View File

@ -484,10 +484,10 @@ void SCH_SEXPR_PLUGIN::loadHierarchy( SCH_SHEET* aSheet )
// Save the current path so that it gets restored when descending and ascending the // Save the current path so that it gets restored when descending and ascending the
// sheet hierarchy which allows for sheet schematic files to be nested in folders // sheet hierarchy which allows for sheet schematic files to be nested in folders
// relative to the last path a schematic was loaded from. // relative to the last path a schematic was loaded from.
wxLogTrace( traceSchLegacyPlugin, "Saving path \"%s\"", m_currentPath.top() ); wxLogTrace( traceSchLegacyPlugin, "Saving path '%s'", m_currentPath.top() );
m_currentPath.push( fileName.GetPath() ); m_currentPath.push( fileName.GetPath() );
wxLogTrace( traceSchLegacyPlugin, "Current path \"%s\"", m_currentPath.top() ); wxLogTrace( traceSchLegacyPlugin, "Current path '%s'", m_currentPath.top() );
wxLogTrace( traceSchLegacyPlugin, "Loading \"%s\"", fileName.GetFullPath() ); wxLogTrace( traceSchLegacyPlugin, "Loading '%s'", fileName.GetFullPath() );
m_rootSheet->SearchHierarchy( fileName.GetFullPath(), &screen ); m_rootSheet->SearchHierarchy( fileName.GetFullPath(), &screen );
@ -1530,7 +1530,7 @@ void SCH_SEXPR_PLUGIN_CACHE::Load()
wxCHECK2( wxLocale::GetInfo( wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER ) == ".", wxCHECK2( wxLocale::GetInfo( wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER ) == ".",
LOCALE_IO toggle ); LOCALE_IO toggle );
wxLogTrace( traceSchLegacyPlugin, "Loading sexpr symbol library file \"%s\"", wxLogTrace( traceSchLegacyPlugin, "Loading sexpr symbol library file '%s'",
m_libFileName.GetFullPath() ); m_libFileName.GetFullPath() );
FILE_LINE_READER reader( m_libFileName.GetFullPath() ); FILE_LINE_READER reader( m_libFileName.GetFullPath() );

View File

@ -718,10 +718,10 @@ void SCH_LEGACY_PLUGIN::loadHierarchy( SCH_SHEET* aSheet )
// Save the current path so that it gets restored when descending and ascending the // Save the current path so that it gets restored when descending and ascending the
// sheet hierarchy which allows for sheet schematic files to be nested in folders // sheet hierarchy which allows for sheet schematic files to be nested in folders
// relative to the last path a schematic was loaded from. // relative to the last path a schematic was loaded from.
wxLogTrace( traceSchLegacyPlugin, "Saving path \"%s\"", m_currentPath.top() ); wxLogTrace( traceSchLegacyPlugin, "Saving path '%s'", m_currentPath.top() );
m_currentPath.push( fileName.GetPath() ); m_currentPath.push( fileName.GetPath() );
wxLogTrace( traceSchLegacyPlugin, "Current path \"%s\"", m_currentPath.top() ); wxLogTrace( traceSchLegacyPlugin, "Current path '%s'", m_currentPath.top() );
wxLogTrace( traceSchLegacyPlugin, "Loading \"%s\"", fileName.GetFullPath() ); wxLogTrace( traceSchLegacyPlugin, "Loading '%s'", fileName.GetFullPath() );
m_rootSheet->SearchHierarchy( fileName.GetFullPath(), &screen ); m_rootSheet->SearchHierarchy( fileName.GetFullPath(), &screen );
@ -2613,15 +2613,15 @@ void SCH_LEGACY_PLUGIN_CACHE::Load()
wxCHECK_RET( m_libFileName.IsAbsolute(), wxCHECK_RET( m_libFileName.IsAbsolute(),
wxString::Format( "Cannot use relative file paths in legacy plugin to " wxString::Format( "Cannot use relative file paths in legacy plugin to "
"open library \"%s\".", m_libFileName.GetFullPath() ) ); "open library '%s'.", m_libFileName.GetFullPath() ) );
wxLogTrace( traceSchLegacyPlugin, "Loading legacy symbol file \"%s\"", wxLogTrace( traceSchLegacyPlugin, "Loading legacy symbol file '%s'",
m_libFileName.GetFullPath() ); m_libFileName.GetFullPath() );
FILE_LINE_READER reader( m_libFileName.GetFullPath() ); FILE_LINE_READER reader( m_libFileName.GetFullPath() );
if( !reader.ReadLine() ) if( !reader.ReadLine() )
THROW_IO_ERROR( _( "unexpected end of file" ) ); THROW_IO_ERROR( _( "Unexpected end of file." ) );
const char* line = reader.Line(); const char* line = reader.Line();
@ -3248,7 +3248,7 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDrawEntries( std::unique_ptr<LIB_SYMBOL>& aSym
line = aReader.ReadLine(); line = aReader.ReadLine();
} }
SCH_PARSE_ERROR( "file ended prematurely loading symbol draw element", aReader, line ); SCH_PARSE_ERROR( "File ended prematurely loading symbol draw element.", aReader, line );
} }
@ -3764,7 +3764,7 @@ void SCH_LEGACY_PLUGIN_CACHE::loadFootprintFilters( std::unique_ptr<LIB_SYMBOL>&
line = aReader.ReadLine(); line = aReader.ReadLine();
} }
SCH_PARSE_ERROR( "file ended prematurely while loading footprint filters", aReader, line ); SCH_PARSE_ERROR( "File ended prematurely while loading footprint filters.", aReader, line );
} }

View File

@ -159,7 +159,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
msg.Printf( _( "Error occurred loading schematic file '%s'." ), fullFilename ); msg.Printf( _( "Error loading schematic '%s'." ), fullFilename );
DisplayErrorMessage( this, msg, ioe.What() ); DisplayErrorMessage( this, msg, ioe.What() );
msg.Printf( _( "Failed to load '%s'." ), fullFilename ); msg.Printf( _( "Failed to load '%s'." ), fullFilename );
@ -281,7 +281,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
msg.Printf( _( "An error occurred loading the symbol library table '%s'." ), msg.Printf( _( "Error loading the symbol library table '%s'." ),
symLibTableFn.GetFullPath() ); symLibTableFn.GetFullPath() );
DisplayErrorMessage( nullptr, msg, ioe.What() ); DisplayErrorMessage( nullptr, msg, ioe.What() );
return false; return false;

View File

@ -910,8 +910,8 @@ void SYMBOL_EDIT_FRAME::SyncLibraries( bool aShowProgress, const wxString& aForc
m_libMgr->Sync( aForceRefresh, m_libMgr->Sync( aForceRefresh,
[&]( int progress, int max, const wxString& libName ) [&]( int progress, int max, const wxString& libName )
{ {
progressDlg.Update( progress, progressDlg.Update( progress, wxString::Format( _( "Loading library '%s'..." ),
wxString::Format( _( "Loading library '%s'" ), libName ) ); libName ) );
} ); } );
} }
else else

View File

@ -285,7 +285,7 @@ bool SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib( const wxString& aAliasName, in
{ {
wxString msg; wxString msg;
msg.Printf( _( "Error occurred loading symbol %s from library '%s'." ), msg.Printf( _( "Error loading symbol %s from library '%s'." ),
aAliasName, aAliasName,
GetCurLib() ); GetCurLib() );
DisplayErrorMessage( this, msg, ioe.What() ); DisplayErrorMessage( this, msg, ioe.What() );

View File

@ -102,7 +102,7 @@ void SYMBOL_LIBRARY_MANAGER::Preload( PROGRESS_REPORTER& aReporter )
{ {
HTML_MESSAGE_BOX dlg( &m_frame, _( "Load Error" ) ); HTML_MESSAGE_BOX dlg( &m_frame, _( "Load Error" ) );
dlg.MessageSet( _( "Errors were encountered loading symbols:" ) ); dlg.MessageSet( _( "Errors loading symbols:" ) );
wxString msg = loader.GetErrors(); wxString msg = loader.GetErrors();
msg.Replace( "\n", "<BR>" ); msg.Replace( "\n", "<BR>" );
@ -429,7 +429,7 @@ LIB_SYMBOL* SYMBOL_LIBRARY_MANAGER::GetBufferedSymbol( const wxString& aAlias,
} }
catch( const IO_ERROR& e ) catch( const IO_ERROR& e )
{ {
wxLogMessage( _( "Error loading symbol \"%s\" from library \"%s\". (%s)" ), wxLogMessage( _( "Error loading symbol %s from library '%s'. (%s)" ),
aAlias, aLibrary, e.What() ); aAlias, aLibrary, e.What() );
bufferedSymbol = nullptr; bufferedSymbol = nullptr;
} }

View File

@ -514,7 +514,7 @@ void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
{ {
if( aShowProgress ) if( aShowProgress )
{ {
lib_dialog.Update( i, _( "Loading " + lib_names[i] ) ); lib_dialog.Update( i, wxString::Format( _( "Loading %s..." ), lib_names[i] ) );
} }
// lib_names[] does not store the file extension. Set it. // lib_names[] does not store the file extension. Set it.

View File

@ -102,7 +102,7 @@ void SYMBOL_TREE_MODEL_ADAPTER::AddLibraries( const std::vector<wxString>& aNick
{ {
HTML_MESSAGE_BOX dlg( aParent, _( "Load Error" ) ); HTML_MESSAGE_BOX dlg( aParent, _( "Load Error" ) );
dlg.MessageSet( _( "Errors were encountered loading symbols:" ) ); dlg.MessageSet( _( "Errors loading symbols:" ) );
wxString msg = loader.GetErrors(); wxString msg = loader.GetErrors();
msg.Replace( "\n", "<BR>" ); msg.Replace( "\n", "<BR>" );

View File

@ -178,7 +178,7 @@ void SYMBOL_PREVIEW_WIDGET::DisplaySymbol( const LIB_ID& aSymbolID, int aUnit, i
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxLogError( wxString::Format( _( "Error loading symbol %s from library %s.\n\n%s" ), wxLogError( wxString::Format( _( "Error loading symbol %s from library '%s'.\n\n%s" ),
aSymbolID.GetLibItemName().wx_str(), aSymbolID.GetLibItemName().wx_str(),
aSymbolID.GetLibNickname().wx_str(), aSymbolID.GetLibNickname().wx_str(),
ioe.What() ) ); ioe.What() ) );

View File

@ -239,15 +239,20 @@ bool GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles( const wxString& aPath,
if( !progress && ( aFilenameList.GetCount() > 1 ) ) if( !progress && ( aFilenameList.GetCount() > 1 ) )
{ {
progress = std::make_unique<WX_PROGRESS_REPORTER>( this, progress = std::make_unique<WX_PROGRESS_REPORTER>( this,
_( "Loading Gerber files..." ), 1, false ); _( "Loading Gerber files..." ), 1,
false );
progress->SetMaxProgress( aFilenameList.GetCount() - 1 ); progress->SetMaxProgress( aFilenameList.GetCount() - 1 );
progress->Report( wxString::Format( _("Loading %u/%zu %s" ), ii+1, progress->Report( wxString::Format( _("Loading %u/%zu %s..." ),
aFilenameList.GetCount(), m_lastFileName ) ); ii+1,
aFilenameList.GetCount(),
m_lastFileName ) );
} }
else if( progress ) else if( progress )
{ {
progress->Report( wxString::Format( _("Loading %u/%zu %s" ), ii+1, progress->Report( wxString::Format( _("Loading %u/%zu %s..." ),
aFilenameList.GetCount(), m_lastFileName ) ); ii+1,
aFilenameList.GetCount(),
m_lastFileName ) );
progress->KeepRefreshing(); progress->KeepRefreshing();
} }

View File

@ -332,7 +332,7 @@ bool PL_EDITOR_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, i
if( !LoadDrawingSheetFile( fn ) ) if( !LoadDrawingSheetFile( fn ) )
{ {
wxMessageBox( wxString::Format( _( "Error when loading file \"%s\"" ), fn ) ); wxMessageBox( wxString::Format( _( "Error loading drawing sheet '%s'." ), fn ) );
return false; return false;
} }
else else

View File

@ -131,9 +131,9 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayError( this, DisplayError( this, wxString::Format( _( "Error loading global footprint library table."
wxString::Format( _( "Error occurred loading global footprint library table:" "\n\n%s" ),
"\n\n%s" ), ioe.What() ) ); ioe.What() ) );
return false; return false;
} }

View File

@ -127,7 +127,7 @@ bool FOOTPRINT_LIST_IMPL::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxStri
if( m_progress_reporter ) if( m_progress_reporter )
{ {
m_progress_reporter->SetMaxProgress( m_queue_in.size() ); m_progress_reporter->SetMaxProgress( m_queue_in.size() );
m_progress_reporter->Report( _( "Fetching Footprint Libraries" ) ); m_progress_reporter->Report( _( "Fetching footprint libraries..." ) );
} }
m_cancelled = false; m_cancelled = false;
@ -156,7 +156,7 @@ bool FOOTPRINT_LIST_IMPL::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxStri
{ {
m_progress_reporter->SetMaxProgress( m_queue_out.size() ); m_progress_reporter->SetMaxProgress( m_queue_out.size() );
m_progress_reporter->AdvancePhase(); m_progress_reporter->AdvancePhase();
m_progress_reporter->Report( _( "Loading Footprints" ) ); m_progress_reporter->Report( _( "Loading footprints..." ) );
} }
loader.Join(); loader.Join();

View File

@ -78,7 +78,7 @@ public:
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxLogError( wxString::Format( _( "Error loading footprint %s from library %s.\n\n%s" ), wxLogError( wxString::Format( _( "Error loading footprint %s from library '%s'.\n\n%s" ),
m_lib_id.GetLibItemName().wx_str(), m_lib_id.GetLibItemName().wx_str(),
m_lib_id.GetLibNickname().wx_str(), m_lib_id.GetLibNickname().wx_str(),
ioe.What() ) ); ioe.What() ) );

View File

@ -148,7 +148,7 @@ FP_LIB_TABLE* PROJECT::PcbFootprintLibs()
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
DisplayErrorMessage( nullptr, _( "Error loading project footprint libraries" ), DisplayErrorMessage( nullptr, _( "Error loading project footprint libraries." ),
ioe.What() ); ioe.What() );
} }
} }

View File

@ -80,7 +80,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) ) if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( filename ) )
{ {
ShowInfoBarError( _( "Error loading drawing sheet" ), true ); ShowInfoBarError( _( "Error loading drawing sheet." ), true );
} }
// Load render settings that aren't stored in PCB_DISPLAY_OPTIONS // Load render settings that aren't stored in PCB_DISPLAY_OPTIONS

View File

@ -625,7 +625,7 @@ void ALTIUM_PCB::ParseBoard6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Board Data" ); m_progressReporter->Report( "Loading board data..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -834,7 +834,7 @@ void ALTIUM_PCB::ParseClasses6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Net Classes" ); m_progressReporter->Report( "Loading netclasses..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -874,7 +874,7 @@ void ALTIUM_PCB::ParseComponents6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Components" ); m_progressReporter->Report( "Loading components..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -921,7 +921,7 @@ void ALTIUM_PCB::ParseComponentsBodies6Data( const CFB::CompoundFileReader& aRea
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Components 3D Models" ); m_progressReporter->Report( "Loading component 3D models..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1204,7 +1204,7 @@ void ALTIUM_PCB::ParseDimensions6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Dimension Drawings" ); m_progressReporter->Report( "Loading dimension drawings..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1245,7 +1245,7 @@ void ALTIUM_PCB::ParseModelsData( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry, const wxString aRootDir ) const CFB::COMPOUND_FILE_ENTRY* aEntry, const wxString aRootDir )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: 3D Models" ); m_progressReporter->Report( "Loading 3D models..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1332,7 +1332,7 @@ void ALTIUM_PCB::ParseNets6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Nets" ); m_progressReporter->Report( "Loading nets..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1355,7 +1355,7 @@ void ALTIUM_PCB::ParsePolygons6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Polygons" ); m_progressReporter->Report( "Loading polygons..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1488,7 +1488,7 @@ void ALTIUM_PCB::ParseRules6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Rules" ); m_progressReporter->Report( "Loading rules..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1520,7 +1520,7 @@ void ALTIUM_PCB::ParseBoardRegionsData( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Board Regions" ); m_progressReporter->Report( "Loading board regions..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1542,7 +1542,7 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data( const CFB::CompoundFileReader& aRe
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Zones" ); m_progressReporter->Report( "Loading zones..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1656,7 +1656,7 @@ void ALTIUM_PCB::ParseRegions6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Zone Fills" ); m_progressReporter->Report( "Loading zone fills..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1744,7 +1744,7 @@ void ALTIUM_PCB::ParseArcs6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Arcs" ); m_progressReporter->Report( "Loading arcs..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -1883,7 +1883,7 @@ void ALTIUM_PCB::ParsePads6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Pads" ); m_progressReporter->Report( "Loading pads..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -2296,7 +2296,7 @@ void ALTIUM_PCB::ParseVias6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Vias" ); m_progressReporter->Report( "Loading vias..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -2356,7 +2356,7 @@ void ALTIUM_PCB::ParseTracks6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Tracks" ); m_progressReporter->Report( "Loading tracks..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -2462,7 +2462,7 @@ void ALTIUM_PCB::ParseTexts6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Text" ); m_progressReporter->Report( "Loading text..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );
@ -2648,7 +2648,7 @@ void ALTIUM_PCB::ParseFills6Data( const CFB::CompoundFileReader& aReader,
const CFB::COMPOUND_FILE_ENTRY* aEntry ) const CFB::COMPOUND_FILE_ENTRY* aEntry )
{ {
if( m_progressReporter ) if( m_progressReporter )
m_progressReporter->Report( "Parse: Rectangles" ); m_progressReporter->Report( "Loading rectangles..." );
ALTIUM_PARSER reader( aReader, aEntry ); ALTIUM_PARSER reader( aReader, aEntry );

View File

@ -399,10 +399,7 @@ static BOARD* loadBoard( const std::string& filename )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxString msg = wxString::Format( _( "Error loading board.\n%s" ), printf( "Board Loading Error: '%s'\n", ioe.Problem() );
ioe.Problem() );
printf( "Board Loading Error: '%s'\n", (const char*) msg.mb_str() );
return nullptr; return nullptr;
} }

View File

@ -100,10 +100,7 @@ BOARD* PCB_TEST_FRAME_BASE::LoadAndDisplayBoard( const std::string& filename )
} }
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
wxString msg = wxString::Format( _( "Error loading board.\n%s" ), printf( "Board Loading Error: '%s'\n", ioe.Problem() );
ioe.Problem() );
printf( "%s\n", (const char*) msg.mb_str() );
return nullptr; return nullptr;
} }