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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4286 - (show annotations)
Thu Mar 7 04:28:11 2013 UTC (6 years, 5 months ago) by caltinay
File size: 1762 byte(s)
Assorted spelling fixes.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
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 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 #include "EsysException.h"
18
19 using namespace esysUtils;
20
21 const std::string EsysException::exceptionNameValue("GeneralEsysException");
22
23 std::ostream &operator<<(std::ostream &output, EsysException &inException){
24 output << inException.toString();
25 return output;
26 }
27
28 EsysException::EsysException():
29 Parent(),
30 m_reason()
31 {
32 updateMessage();
33 }
34
35 EsysException::EsysException(const std::string &exceptionReason):
36 Parent(),
37 m_reason(exceptionReason)
38 {
39 updateMessage();
40 }
41
42 // Copy Constructor.
43 // Do not call the parent copy constructor as it has
44 // undefined effects. In particular, it mat call what() to
45 // which will result on the parent storing a pointer to
46 // m_exceptionMessage's storage.... esp on winblows.
47 EsysException::EsysException(const EsysException &other):
48 Parent(),
49 m_reason(other.m_reason)
50 {
51 updateMessage();
52 }
53
54 EsysException &
55 EsysException::operator=(const EsysException &other) THROW(NO_ARG)
56 {
57 m_reason = other.m_reason;
58 updateMessage();
59 return *this;
60 }
61
62 EsysException::EsysException( const char *cStr ):
63 Parent(),
64 m_reason(cStr)
65 {
66 updateMessage();
67 }
68
69 EsysException::~EsysException() THROW(NO_ARG)
70 {}
71
72 const std::string & EsysException::exceptionName() const
73 {
74 return exceptionNameValue;
75 }
76

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26