Changeset 1729


Ignore:
Timestamp:
Jan 16, 2009, 3:14:57 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Producing nicer error message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/regression/GSLInterpolation.cc

    r1724 r1729  
    4848    interpolator_ = gsl_interp_alloc(interpolator_type, size);
    4949    if (int status=gsl_interp_init(interpolator_, x_, y_, size)) {
    50       std::stringstream ss("GSLInterpolation::GSLInterpolation ");
    51       ss << " GSL error code " << status;
     50      std::stringstream ss;
     51      ss << "GSLInterpolation::GSLInterpolation error code " << status;
    5252      // clean up
    5353      gsl_interp_free(interpolator_);
     
    7171    if (int status=gsl_interp_eval_e(interpolator_, x_, y_, x, accelerator_,
    7272                                     &evaluation_)) {
    73       std::stringstream ss("GSLInterpolation::evaluate ");
    74       ss << " GSL error code " << status;
     73      std::stringstream ss;
     74      ss << "GSLInterpolation::evaluate error code " << status;
    7575      throw utility::GSL_error(ss.str());
    7676    }
     
    8383    if (int status=gsl_interp_eval_deriv_e(interpolator_, x_, y_, x,
    8484                                           accelerator_, &evaluation_)) {
    85       std::stringstream ss("GSLInterpolation::evaluate_derivative ");
    86       ss << " GSL error code " << status;
     85      std::stringstream ss;
     86      ss << "GSLInterpolation::evaluate_derivative error code " << status;
    8787      throw utility::GSL_error(ss.str());
    8888    }
     
    9595    if (int status=gsl_interp_eval_deriv2_e(interpolator_, x_, y_, x,
    9696                                            accelerator_, &evaluation_)) {
    97       std::stringstream ss("GSLInterpolation::evaluate_derivative2 ");
    98       ss << " GSL error code " << status;
     97      std::stringstream ss;
     98      ss << "GSLInterpolation::evaluate_derivative2 error code " << status;
    9999      throw utility::GSL_error(ss.str());
    100100    }
     
    107107    if (int status=gsl_interp_eval_integ_e(interpolator_, x_, y_, a, b,
    108108                                           accelerator_, &evaluation_)) {
    109       std::stringstream ss("GSLInterpolation::evaluate_integral ");
    110       ss << " GSL error code " << status;
     109      std::stringstream ss;
     110      ss << "GSLInterpolation::evaluate_integral error code " << status;
    111111      throw utility::GSL_error(ss.str());
    112112    }
Note: See TracChangeset for help on using the changeset viewer.