/[escript]/branches/intelc_win32/esysUtils/src/EsysException.h
ViewVC logotype

Annotation of /branches/intelc_win32/esysUtils/src/EsysException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 742 - (hide annotations)
Sat Jun 24 11:27:16 2006 UTC (13 years, 2 months ago) by woo409
File MIME type: text/plain
File size: 3450 byte(s)
+ Initial commit of win32 port using intel c++ compiler 9.1.x for Windows
+ This version is failing some file handling tests in python
1 jgs 82 /*
2 elspeth 644 ************************************************************
3     * Copyright 2006 by ACcESS MNRF *
4     * *
5     * http://www.access.edu.au *
6     * Primary Business: Queensland, Australia *
7     * Licensed under the Open Software License version 3.0 *
8     * http://www.opensource.org/licenses/osl-3.0.php *
9     * *
10     ************************************************************
11 jgs 82 */
12    
13     #ifndef ESYSEXCEPTION_H
14     #define ESYSEXCEPTION_H
15 woo409 742 #include "system_dep.h"
16 jgs 82
17     #include <string>
18     #include <sstream>
19     #include <exception>
20 jgs 468 #include <algorithm>
21 jgs 82
22     namespace esysUtils {
23     /**
24 jgs 121 \page esys_exception Esys Exceptions
25 jgs 82 A base class for exception classes used within Esys system.
26    
27 jgs 121 \version 1.0.0
28 jgs 82
29 jgs 121 \section class_desc Class Description:
30 jgs 82 A base class for exception classes used within Esys system.
31    
32 jgs 121 \section class_limits Class Limitations:
33 jgs 82 None
34    
35 jgs 121 \section class_conds Class Conditions of Use:
36 jgs 82 None
37    
38 jgs 121 \section throws Throws:
39 jgs 82 None
40    
41     */
42     class EsysException:public std::exception {
43     public:
44     /**
45 jgs 121 \brief
46 jgs 82 Default Constructor. Creates an exception with no message.
47     */
48     EsysException();
49     /**
50 jgs 121 * \brief
51 jgs 82 Constructor which creates a EsysException with the given message
52    
53     @param exceptionReason Input - Exception message.
54     */
55     EsysException(const std::string &exceptionReason);
56     /**
57 jgs 121 * \brief
58 jgs 82 Constructor which creates a EsysException with the given message
59 jgs 121
60 jgs 82 @param cStr - Exception message.
61     */
62     EsysException( const char *cStr );
63     /**
64 jgs 121 * \brief
65 jgs 82 Copy constructor
66 jgs 121
67 jgs 82 @param inException Input - EsysException
68     */
69     EsysException(const EsysException &inException);
70     /// Destructor
71     virtual ~EsysException() throw();
72     /**
73 jgs 121 \brief
74 jgs 82 Assignment operator.
75 jgs 121
76 jgs 82 @param inException Input - Exception to be copied.
77     */
78     EsysException &operator=(const EsysException &inException);
79     /**
80 jgs 121 \brief
81 jgs 82 Return the exception message in the form
82 jgs 121 &lt;Exception Name&gt;: &lt;Exception Message&gt;
83    
84 jgs 82 @return the exception message.
85     */
86     std::string toString() const;
87     /**
88 jgs 121 \brief
89 jgs 82 Return the name of the exception. This is expected to be overloaded
90     in derived classes with the derived class name.
91 jgs 121
92 jgs 82 @return the name of the exception.
93     */
94     virtual std::string exceptionName() const;
95     /**
96 jgs 121 \brief
97 jgs 82 Return the ostrstream that contains the exception message.
98     This is useful for entering or adding to the message as the stream
99     insertion operators can then be used.
100 jgs 121
101 jgs 82 @return the ostrstream for the exception reason.
102     */
103     std::ostringstream& reason();
104     /**
105 jgs 121 \brief
106 jgs 82 Return a description of the exception in the same format as the toString
107     method.
108 jgs 121
109 jgs 82 @return a description of the exception.
110     */
111     virtual const char* what() const throw();
112     private:
113     //
114     // the exception message
115     std::ostringstream m_reason;
116     //
117     // the full exception message kept in permenant storage
118     mutable std::string m_exceptionMessage;
119     };
120     /**
121 jgs 121 \brief
122 jgs 82 Stream insertion operator for EsysExceptions
123 jgs 121
124 jgs 82 @param output Input - Output stream.
125     @param inException Input - The exception to be inserted into the output
126     stream.
127     */
128     std::ostream &operator<<(std::ostream &output, EsysException &inException);
129    
130     }
131    
132     #endif

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26