Add KI_PARAM_ERROR, similar to std::invalid_argument but using wxString instead of std::string to throw errors.
std::invalid_argument does not work fine with translated strings as argument for message. (the translated message is incorrectly or not displayed if it contains non ascii8 chars, at least on Windows). KI_PARAM_ERROR can be throw-ed with a translatable/translated string (a wxString)
This commit is contained in:
@@ -382,9 +382,10 @@ void SIM_PLOT_FRAME::AddTuner( SCH_COMPONENT* aComponent )
|
||||
m_tuners.push_back( tuner );
|
||||
m_tunePanel->Layout();
|
||||
}
|
||||
catch( ... )
|
||||
catch( const KI_PARAM_ERROR& e )
|
||||
{
|
||||
// Sorry, no bonus
|
||||
DisplayError( nullptr, e.What() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user