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

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

Parent Directory Parent Directory | Revision Log Revision Log


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


1
2 /*******************************************************
3 *
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
14
15 #include "EsysException.h"
16
17 using namespace esysUtils;
18
19 const std::string EsysException::exceptionNameValue("GeneralEsysException");
20
21 std::ostream &operator<<(std::ostream &output, EsysException &inException){
22 output << inException.toString();
23 return output;
24 }
25
26 EsysException::EsysException():
27 Parent(),
28 m_reason()
29 {
30 updateMessage();
31 }
32
33 EsysException::EsysException(const std::string &exceptionReason):
34 Parent(),
35 m_reason(exceptionReason)
36 {
37 updateMessage();
38 }
39
40 // Copy Constructor.
41 // 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 EsysException::EsysException(const EsysException &other):
46 Parent(),
47 m_reason(other.m_reason)
48 {
49 updateMessage();
50 }
51
52 EsysException &
53 EsysException::operator=(const EsysException &other) THROW(NO_ARG)
54 {
55 m_reason = other.m_reason;
56 updateMessage();
57 return *this;
58 }
59
60 EsysException::EsysException( const char *cStr ):
61 Parent(),
62 m_reason(cStr)
63 {
64 updateMessage();
65 }
66
67 EsysException::~EsysException() THROW(NO_ARG)
68 {}
69
70 const std::string & EsysException::exceptionName() const
71 {
72 return exceptionNameValue;
73 }
74

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26