MARLEY (Model of Argon Reaction Low Energy Yields)  v1.1.0
A Monte Carlo event generator for tens-of-MeV neutrino-nucleus interactions in liquid argon
 All Classes Functions Variables Enumerations Pages
Public Member Functions | Protected Attributes | List of all members
marley::Error Class Reference

Base class for all exceptions thrown by MARLEY functions. More...

#include <Error.hh>

Inheritance diagram for marley::Error:

Public Member Functions

 Error (const char *message)
 
 Error (const std::string &message)
 
virtual const char * what () const noexcept
 Method called by the C++ standard library to display the error message.
 

Protected Attributes

std::string msg_
 

Detailed Description

Base class for all exceptions thrown by MARLEY functions.

A distinct exception class allows the user to differentiate between exceptions thrown by MARLEY and those thrown by other libraries. The marley::Error class also forwards its error message to the marley::Logger class, which prints them to enabled logging streams as appropriate.

Todo:
Create an MARLEY exception class hierarchy as needed.

Constructor & Destructor Documentation

marley::Error::Error ( const char *  message)
inlineexplicit
Parameters
messageAn error message to display if the exception is not caught
marley::Error::Error ( const std::string &  message)
inlineexplicit
Parameters
messageAn error message to display if the exception is not caught

The documentation for this class was generated from the following file: