Public Member Functions | Private Attributes | Friends | List of all members
genie::exceptions::InteractionException Class Reference

Exception used inside Interaction classes. More...

#include <InteractionException.h>

Inheritance diagram for genie::exceptions::InteractionException:

Public Member Functions

 InteractionException ()
 
 InteractionException (const std::string &reason)
 
 ~InteractionException () throw ()
 
void Print (std::ostream &stream) const
 
const std::stringShowReason () const
 
const char * what () const throw ()
 

Private Attributes

std::string fReason
 

Friends

std::ostream & operator<< (std::ostream &stream, const InteractionException &exception)
 

Detailed Description

Exception used inside Interaction classes.

Author
Jeremy Wolcott <jwolcott fnal.gov> Tufts University

July 15, 2016

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 29 of file InteractionException.h.

Constructor & Destructor Documentation

genie::exceptions::InteractionException::InteractionException ( )

Definition at line 21 of file InteractionException.cxx.

genie::exceptions::InteractionException::InteractionException ( const std::string reason)

Definition at line 25 of file InteractionException.cxx.

26  : fReason(reason)
27  {}
genie::exceptions::InteractionException::~InteractionException ( )
throw (
)
inline

Definition at line 34 of file InteractionException.h.

34 {};

Member Function Documentation

void genie::exceptions::InteractionException::Print ( std::ostream &  stream) const

Definition at line 29 of file InteractionException.cxx.

30  {
31  stream << "**EXCEPTION Reason: " << this->ShowReason() << std::endl;
32  }
const std::string & ShowReason() const
QTextStream & endl(QTextStream &s)
const std::string& genie::exceptions::InteractionException::ShowReason ( void  ) const
inline

Definition at line 37 of file InteractionException.h.

const char* genie::exceptions::InteractionException::what ( void  ) const
throw (
)
inline

Definition at line 40 of file InteractionException.h.

40 { return this->fReason.c_str(); };

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const InteractionException exception 
)
friend

Definition at line 37 of file InteractionException.cxx.

38 {
39  exc.Print(stream);
40  return stream;
41 }

Member Data Documentation

std::string genie::exceptions::InteractionException::fReason
private

Definition at line 45 of file InteractionException.h.


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