Skip to content

Commit cc7427e

Browse files
author
Jan-Niklas Bohnensack
committed
Changed invalid_argument to runtime_error
1 parent e9eff49 commit cc7427e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/module/Observer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void ObserverTimeEvolution::addTimeRange(double min, double max, double numb, bo
335335
if (log) {
336336
if ( min <= 0 ){
337337
std::cout << "min can not be <= 0 if log=true" << std::endl;
338-
throw new std::invalid_argument("min can not be <= 0 if log=true");
338+
throw new std::runtime_error("min can not be <= 0 if log=true");
339339
}
340340
addTime(min * pow(max / min, i / (numb - 1.0)));
341341
} else {
@@ -357,7 +357,7 @@ void ObserverTimeEvolution::setTimes(const std::vector<double> &detList){
357357
void ObserverTimeEvolution::setMinimum(double min){
358358
if ( (min <= 0) && isLogarithmicScaling){
359359
std::cout << "minimum can not be <= 0 if isLogarithmicScaling=true" << std::endl;
360-
throw new std::invalid_argument("minimum can not be <= 0 if isLogarithmicScaling=true");
360+
throw new std::runtime_error("minimum can not be <= 0 if isLogarithmicScaling=true");
361361
}
362362
this->minimum = min;
363363
}

0 commit comments

Comments
 (0)