Skip to content

Commit

Permalink
-added exception for not supported output format
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12368 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Jul 27, 2012
1 parent 55b08f0 commit 8b3d44b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SimulationRuntime/cpp/Source/SimManager/Main.cpp
Expand Up @@ -27,6 +27,14 @@ int main(int argc, const char* argv[])
libraries_path.make_preferred();
modelica_path.make_preferred();
string resultsfilename(argv[modelname_index]);


fs::path results_file_path = fs::path( resultsfilename) ;
if(!(results_file_path.extension().string() == ".csv"))
{
std::string eception_msg = "The output format is not supported yet. Please use outputFormat=\"csv\" in simulate command ";
throw std::invalid_argument(eception_msg.c_str());
}
//std::cout << libraries_path << " end" << std::endl;
try
{
Expand Down

0 comments on commit 8b3d44b

Please sign in to comment.