Skip to content
Snippets Groups Projects
Commit 5e2f710b authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

better errmsg

parent b737fef1
No related branches found
No related tags found
No related merge requests found
......@@ -204,6 +204,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
if ( mkfifo( ret_fifonam.c_str(), 0666 ) )
throw "SYSTEM ERROR cannot make " + ret_fifonam;
string errmsg;
if ( scrInpMode==_STDIN ){
string par_fifonam = string("/tmp/par-") + getenv( "LOGNAME" );
......@@ -213,6 +214,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
string cmd = expr + " < " + par_fifonam +
" > " + ret_fifonam + " &";
errmsg = "script " + expr;
system( cmd.c_str() );
int par_fifo;
......@@ -245,6 +247,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
pars += " " + str( format("%g ") % VC(j)->P[ip] );
string cmd = expr + pars + " > " + ret_fifonam + " &";
errmsg = "command '" + expr + pars + "'";
system( cmd.c_str() );
}
......@@ -255,7 +258,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
if ( evaMode==_SCR ) {
for ( uint i=0; i<vt.size(); ++i ) {
if ( fscanf( F, "%lg\n", &((*ret)[i]) )!=1 )
throw "script returns no value for t["+
throw errmsg + " returns no value for t["+
S(i)+"]="+S(vt[i]);
}
} else { // evaMode==_SCR_INTP
......@@ -265,7 +268,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
S.push_xy( x, y );
// interpolation:
if ( S.size()<2 )
throw "script returns only " + S(S.size()) + " lines";
throw errmsg + " returns only " + S(S.size()) + " valid lines";
cout << "DEB call intpol " << vt.front() << " .. " << vt.back()
<< "\n";
S.intpol( vt, *ret );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment