GooFit  v2.1.3
Error.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <CLI/Error.hpp>
4 
5 #include <fmt/format.h>
6 
7 namespace GooFit {
8 
10 struct GeneralError : public CLI::Error {
11  template <typename... Args>
12  GeneralError(std::string name, Args &&... args)
13  : Error("GeneralError", fmt::format(name, std::forward<Args>(args)...), 2) {}
14 };
15 
16 struct OutOfRange : public GeneralError {
17  OutOfRange(std::string name, double value, double min, double max)
18  : GeneralError("{} value {} is not in range {} to {}", name, value, min, max) {}
19 };
20 } // namespace GooFit
Thrown when a general error is encountered.
Definition: Error.h:10
GeneralError(std::string name, Args &&... args)
Definition: Error.h:12
OutOfRange(std::string name, double value, double min, double max)
Definition: Error.h:17