1 #ifndef ALIHLTMUONERROR_H
2 #define ALIHLTMUONERROR_H
3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
20 ////////////////////////////////////////////////////////////////////////////////
22 // Author: Artur Szostak
23 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
25 // AliHLTMUONError is the base excpetion class used by the dHLT subsystem.
26 // All child classes used to throw exceptions should be derived from this
27 // class to allow easy catching of classes of errors.
29 ////////////////////////////////////////////////////////////////////////////////
31 #include "AliHLTMUONBasicTypes.h"
36 class AliHLTMUONError : public std::exception
38 /* Define the << operator for streams to be able to do something like:
40 AliHLTMUONError myerror;
41 cout << myerror << endl;
43 friend std::ostream& operator << (std::ostream& os, const AliHLTMUONError& error)
45 os << error.Message();
51 AliHLTMUONError() throw() {};
52 virtual ~AliHLTMUONError() throw() {};
54 /* Should return a human readable string containing a description of the
57 virtual const char* Message() const throw() = 0;
59 /* Returns an error code describing the error. The error code should be
60 unique to the entire system
62 virtual Int ErrorCode() const throw() = 0;
64 virtual const char* what() const throw()
71 #endif // ALIHLTMUONERROR_H