OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ClassicException.h
Go to the documentation of this file.
1#ifndef CLASSIC_ClassicException_HH
2#define CLASSIC_ClassicException_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: ClassicException.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: ClassicException
13//
14// ------------------------------------------------------------------------
15// Class category: Utilities
16// ------------------------------------------------------------------------
17//
18// $Date: 2000/03/27 09:32:37 $
19// $Author: fci $
20//
21// ------------------------------------------------------------------------
22
23#include <string>
24
25// Class ClassicException
26// ------------------------------------------------------------------------
28
30
31public:
32
34 virtual const std::string &what() const;
35
37 virtual const std::string &where() const;
38
39protected:
40
42 // Arguments:
43 // [DL]
44 // [DT][b]meth[/b]
45 // [DD]the name of the method or function detecting the exception
46 // [DT][b]msg [/b]
47 // [DD]the message string identifying the exception
48 // [/DL]
49 ClassicException(const std::string &meth, const std::string &msg);
50
52 virtual ~ClassicException();
53
54protected:
55
56 // Not implemented.
58
59 // The method detecting the exception and the message.
60 const std::string message;
61 const std::string method;
62};
63
64#endif // CLASSIC_ClassicException_HH
The abstract base class for all exceptions in CLASSIC.
virtual const std::string & what() const
Return the message string for the exception.
virtual ~ClassicException()
virtual const std::string & where() const
Return the name of the method or function which detected the exception.
const std::string method
const std::string message