Loading src/core/utils/exceptions.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ namespace allpix { * Problems that could also have been detected at compile time by specialized software */ class LogicError : public Exception { public: /** * @brief Creates exception with the given logical problem * @param what_arg Text describing the problem Loading src/core/utils/unit.tpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ namespace allpix { // If the input is an integral value: check so that it doesn't have decimals after applying the unit if constexpr(std::is_integral_v<T>) { if(out != static_cast<T>(out)) { throw std::invalid_argument("Cannot use integer value with non-integer internal unit; the combination " + throw LogicError("Cannot use integer value with non-integer internal unit; the combination " + std::to_string(inp) + " " + str + " is invalid."); } return static_cast<T>(out); Loading Loading
src/core/utils/exceptions.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ namespace allpix { * Problems that could also have been detected at compile time by specialized software */ class LogicError : public Exception { public: /** * @brief Creates exception with the given logical problem * @param what_arg Text describing the problem Loading
src/core/utils/unit.tpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ namespace allpix { // If the input is an integral value: check so that it doesn't have decimals after applying the unit if constexpr(std::is_integral_v<T>) { if(out != static_cast<T>(out)) { throw std::invalid_argument("Cannot use integer value with non-integer internal unit; the combination " + throw LogicError("Cannot use integer value with non-integer internal unit; the combination " + std::to_string(inp) + " " + str + " is invalid."); } return static_cast<T>(out); Loading