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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 11 months ago) by ksteube
File size: 1635 byte(s)
Copyright updated in all files

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_ANY
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_ANY
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