InteractionException.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3  Copyright (c) 2003-2020, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Jeremy Wolcott <jwolcott \at fnal.gov>
7  Tufts University
8 */
9 //____________________________________________________________________________
10 
11 
12 #include <iostream>
13 
14 #include "InteractionException.h"
15 
16 namespace genie
17 {
18  namespace exceptions
19  {
20 
22  : fReason("")
23  {}
24 
26  : fReason(reason)
27  {}
28 
29  void InteractionException::Print (std::ostream& stream) const
30  {
31  stream << "**EXCEPTION Reason: " << this->ShowReason() << std::endl;
32  }
33 
34  } /* namespace exceptions */
35 } /* namespace genie */
36 
37 std::ostream & operator<< (std::ostream& stream, const genie::exceptions::InteractionException & exc)
38 {
39  exc.Print(stream);
40  return stream;
41 }
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
const std::string & ShowReason() const
Exception used inside Interaction classes.
friend std::ostream & operator<<(std::ostream &stream, const InteractionException &exception)
void Print(std::ostream &stream) const
QTextStream & endl(QTextStream &s)