Commit ea40b628 authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Changed to throwing LogicError

parent 764fa18b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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);