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:
jean-pierre charras
2018-06-05 13:29:51 +02:00
parent 58814e838d
commit a288d6199e
4 changed files with 38 additions and 6 deletions
+2 -1
View File
@@ -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() );
}
}