Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24509 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Feb 10, 2015
1 parent d084ea1 commit 6ee280a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -1823,7 +1823,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__)) then
}
catch(ModelicaSimulationError& ex)
{

std::cerr << "Simulation stopped with error in " << error_id_string(ex.getErrorID()) << ": " << ex.what();
return 1;
}
Expand Down Expand Up @@ -8127,8 +8127,8 @@ template equation_(SimEqSystem eq, Context context, Text &varDecls, SimCode simC
}
catch(ModelicaSimulationError& ex)
{
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);

string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
throw ModelicaSimulationError(ALGLOOP_EQ_SYSTEM,error);
}
>>
Expand Down Expand Up @@ -8178,7 +8178,7 @@ template equation_(SimEqSystem eq, Context context, Text &varDecls, SimCode simC
}
catch(ModelicaSimulationError& ex)
{
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
throw ModelicaSimulationError(ALGLOOP_EQ_SYSTEM,error);

}
Expand Down Expand Up @@ -9381,7 +9381,7 @@ template equationLinearOrNonLinear(SimEqSystem eq, Context context,Text &varDecl
}
catch(ModelicaSimulationError& ex)
{
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
throw ModelicaSimulationError(ALGLOOP_EQ_SYSTEM,error);
}
>>
Expand Down Expand Up @@ -9432,7 +9432,7 @@ template equationLinearOrNonLinear(SimEqSystem eq, Context context,Text &varDecl
}
catch(ModelicaSimulationError& ex)
{
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
string error = add_error_info("Nonlinear solver stopped",ex.what(),ex.getErrorID(),_simTime);
throw ModelicaSimulationError(ALGLOOP_EQ_SYSTEM,error);
}

Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Core/SimController/SimController.cpp
Expand Up @@ -183,7 +183,7 @@ void SimController::Start(boost::shared_ptr<IMixedSystem> mixedsystem, SimSettin
}
catch(ModelicaSimulationError & ex)
{

string error = add_error_info(string("Simulation failed for ") + simsettings.outputfile_name,ex.what(),ex.getErrorID());
throw ModelicaSimulationError(SIMMANAGER,error);
}
Expand Down
Expand Up @@ -6,26 +6,26 @@
( SOLVER,"csv")(MODEL_FACTORY,"model factory")(SIMMANAGER,"simulation manager")(EVENT_HANDLING,"event handling")
(TIME_EVENTS,"time event")( DATASTORAGE,"data storage")(UTILITY,"utility")(MODEL_ARRAY_FUNCTION,"array function")
(MATH_FUNCTION,"math function");


return error_id_info[id];
}


string add_error_info(string new_info,string info,SIMULATION_ERROR id,double& time)
{
ostringstream ss;
ss << new_info << " stopped at time " << time << " with error in " << error_id_string(id) << ": " << std::endl << info;
return ss.str().c_str();
return ss.str().c_str();


}

string add_error_info(string new_info,string info,SIMULATION_ERROR id)
{
ostringstream ss;
ss << new_info << " with error in " << error_id_string(id) << ": " << std::endl << info;
return ss.str().c_str();
return ss.str().c_str();


}

0 comments on commit 6ee280a

Please sign in to comment.