~durga/maus/rel709

« back to all changes in this revision

Viewing changes to src/common_cpp/Utils/MAUSEvaluator.cc

  • Committer: Durga Rajaram
  • Date: 2013-10-01 00:19:57 UTC
  • mfrom: (659.1.74 rc)
  • Revision ID: durga@fnal.gov-20131001001957-iswih60vis9rodw0
Tags: MAUS-v0.7.1
MAUS-v0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
 
87
87
    // now put transform py_value into C++ double
88
88
    double value = 0.;
89
 
    PyArg_Parse(py_value, "d", &value);
90
 
 
 
89
    if (!PyArg_Parse(py_value, "d", &value)) {
 
90
        throw(Squeal(Squeal::recoverable,
 
91
                   "Failed to evaluate expression \""+function+"\"",
 
92
                   "MAUSEvaluator::evaluate"));
 
93
    }
91
94
    // clean up
92
95
    Py_DECREF(py_value);
93
96
    Py_DECREF(py_arg);
94
 
 
95
97
    // return
96
98
    return value;
97
99
}