/[escript]/trunk/esysUtils/src/EsysException.cpp
ViewVC logotype

Annotation of /trunk/esysUtils/src/EsysException.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2020 - (hide annotations)
Mon Nov 10 14:02:17 2008 UTC (12 years, 10 months ago) by phornby
File size: 1643 byte(s)
THROW_ANY is dead. Pls read comments in esysUtils/src/system_dep.h


1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 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 ksteube 1312
14 ksteube 1811
15 jgs 468 #include "EsysException.h"
16 jgs 82
17     using namespace esysUtils;
18    
19 phornby 1455 const std::string EsysException::exceptionNameValue("GeneralEsysException");
20    
21     std::ostream &operator<<(std::ostream &output, EsysException &inException){
22 jgs 82 output << inException.toString();
23     return output;
24     }
25    
26     EsysException::EsysException():
27 phornby 1455 Parent(),
28     m_reason()
29 jgs 82 {
30 phornby 1455 updateMessage();
31 jgs 82 }
32    
33 phornby 1455 EsysException::EsysException(const std::string &exceptionReason):
34     Parent(),
35     m_reason(exceptionReason)
36 jgs 82 {
37 phornby 1455 updateMessage();
38 jgs 82 }
39    
40     // Copy Constructor.
41 phornby 1628 // Do not call the parent copy constructor as it has
42     // undefined effects. In particular, it mat call what() to
43     // which will resuly on the parent storing a pointer to
44     // m_exceptionMessage's storage.... esp on winblows.
45 phornby 1455 EsysException::EsysException(const EsysException &other):
46 phornby 1628 Parent(),
47 phornby 1455 m_reason(other.m_reason)
48 jgs 82 {
49 phornby 1455 updateMessage();
50 jgs 82 }
51    
52 phornby 1628 EsysException &
53 phornby 2020 EsysException::operator=(const EsysException &other) THROW(NO_ARG)
54 phornby 1628 {
55     m_reason = other.m_reason;
56     updateMessage();
57     return *this;
58     }
59    
60 jgs 82 EsysException::EsysException( const char *cStr ):
61 phornby 1455 Parent(),
62     m_reason(cStr)
63 jgs 82 {
64 phornby 1455 updateMessage();
65 jgs 82 }
66    
67 phornby 2020 EsysException::~EsysException() THROW(NO_ARG)
68 jgs 82 {}
69    
70 phornby 1455 const std::string & EsysException::exceptionName() const
71 jgs 82 {
72 phornby 1455 return exceptionNameValue;
73 jgs 82 }
74    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26