/[escript]/branches/refine/buckley/src/BuckleyException.h
ViewVC logotype

Annotation of /branches/refine/buckley/src/BuckleyException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3671 - (hide annotations)
Wed Nov 16 04:01:53 2011 UTC (10 years ago) by jfenwick
File MIME type: text/plain
File size: 2280 byte(s)
Rename complete
1 jfenwick 3658
2     /*******************************************************
3     *
4     * Copyright (c) 2011 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13    
14    
15     #if !defined rdomainException_H
16     #define rdomainException_H
17     #include "system_dep.h"
18    
19     #include "esysUtils/EsysException.h"
20    
21 jfenwick 3668 namespace buckley
22 jfenwick 3658 {
23    
24     /**
25     \brief
26 jfenwick 3671 BuckleyException exception class.
27 jfenwick 3658
28     Description:
29 jfenwick 3671 BuckleyException exception class.
30 jfenwick 3658 The class provides a public function returning the exception name
31     */
32 jfenwick 3671 class BuckleyException : public esysUtils::EsysException
33 jfenwick 3658 {
34    
35     protected:
36    
37     typedef EsysException Parent;
38    
39     public:
40     /**
41     \brief
42     Default constructor for the exception.
43     */
44 jfenwick 3668 BUCKLEY_DLL_API
45 jfenwick 3671 BuckleyException() : Parent() { updateMessage();}
46 jfenwick 3658 /**
47     \brief
48     Constructor for the exception.
49     */
50 jfenwick 3668 BUCKLEY_DLL_API
51 jfenwick 3671 BuckleyException(const char *cstr) : Parent(cstr) { updateMessage();}
52 jfenwick 3658 /**
53     \brief
54     Constructor for the exception.
55     */
56 jfenwick 3668 BUCKLEY_DLL_API
57 jfenwick 3671 BuckleyException(const std::string &str) :
58 jfenwick 3658 Parent(str) { updateMessage();}
59     /**
60     \brief
61     Copy Constructor for the exception.
62     */
63 jfenwick 3668 BUCKLEY_DLL_API
64 jfenwick 3671 BuckleyException(const BuckleyException &other) : Parent(other)
65 jfenwick 3658 {
66     updateMessage();
67     }
68    
69     /// Destructor
70 jfenwick 3668 BUCKLEY_DLL_API
71 jfenwick 3671 virtual ~BuckleyException() THROW(NO_ARG) {}
72 jfenwick 3658
73     /**
74     \brief
75     Assignment operator.
76     */
77 jfenwick 3668 BUCKLEY_DLL_API
78 jfenwick 3671 inline BuckleyException &
79     operator=(const BuckleyException &other ) THROW(NO_ARG)
80 jfenwick 3658 {
81     Parent::operator=(other);
82     updateMessage();
83     return *this;
84     }
85    
86     /**
87     \brief
88     Returns the name of the exception.
89     */
90 jfenwick 3668 BUCKLEY_DLL_API
91 jfenwick 3658 virtual const std::string & exceptionName() const;
92    
93     private:
94    
95     //
96     // the exception name is immutable and class-wide.
97     // Inheritor note; you need one of these too.
98     // and an overloaded exceptionName() in your .cpp implementation file.
99     static const std::string exceptionNameValue;
100     };
101    
102     } // end of namespace
103     #endif

  ViewVC Help
Powered by ViewVC 1.1.26