/[escript]/trunk/pasowrap/src/PasoException.h
ViewVC logotype

Annotation of /trunk/pasowrap/src/PasoException.h

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26