Skip to content
Snippets Groups Projects
Select Git revision
  • c3490bfa8a90afe86b4695be73796f993100eb74
  • master default protected
  • beamline_training
  • npsim
  • code.jlab.org
  • pr/nhcal
  • pr/rerun_fix
  • pr/minor_fixes
  • temp/df
  • Simple-Shyam-patch-1
  • interruptible-resource-groups
  • femc-collect-always
  • add_lowq2_benchmarks
  • pr/insert_neutron_flaky
  • Low-Q2_onnx_training
  • Low-Q2_training
  • matplotlibrc
  • pr/normalized_output_branch_sizes
  • snakemake-batch
  • pr/snakefmt
  • pr/venv
  • v0.0.1
22 results

exception.h

Blame
  • exception.h 541 B
    #ifndef UTIL_EXCEPTION_H
    #define UTIL_EXCEPTION_H
    
    #include <exception>
    #include <string>
    
    namespace eic::util {
      class Exception : public std::exception {
      public:
        Exception(std::string_view msg, std::string_view type = "exception") : msg_{msg}, type_{type} {}
    
        virtual const char* what() const throw() { return msg_.c_str(); }
        virtual const char* type() const throw() { return type_.c_str(); }
        virtual ~Exception() throw() {}
    
      private:
        std::string msg_;
        std::string type_;
      };
    } // namespace eic::util
    
    #endif