/[escript]/branches/scons-dev/esysUtils/src/EsysException.cpp
ViewVC logotype

Contents of /branches/scons-dev/esysUtils/src/EsysException.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1640 - (show annotations)
Tue Jul 15 00:15:12 2008 UTC (11 years, 11 months ago) by ksteube
File size: 1670 byte(s)
Branch for scons development
1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 #include "EsysException.h"
17
18 using namespace esysUtils;
19
20 const std::string EsysException::exceptionNameValue("GeneralEsysException");
21
22 std::ostream &operator<<(std::ostream &output, EsysException &inException){
23 output << inException.toString();
24 return output;
25 }
26
27 EsysException::EsysException():
28 Parent(),
29 m_reason()
30 {
31 updateMessage();
32 }
33
34 EsysException::EsysException(const std::string &exceptionReason):
35 Parent(),
36 m_reason(exceptionReason)
37 {
38 updateMessage();
39 }
40
41 // Copy Constructor.
42 // Do not call the parent copy constructor as it has
43 // undefined effects. In particular, it mat call what() to
44 // which will resuly on the parent storing a pointer to
45 // m_exceptionMessage's storage.... esp on winblows.
46 EsysException::EsysException(const EsysException &other):
47 Parent(),
48 m_reason(other.m_reason)
49 {
50 updateMessage();
51 }
52
53 EsysException &
54 EsysException::operator=(const EsysException &other) THROW_ANY
55 {
56 m_reason = other.m_reason;
57 updateMessage();
58 return *this;
59 }
60
61 EsysException::EsysException( const char *cStr ):
62 Parent(),
63 m_reason(cStr)
64 {
65 updateMessage();
66 }
67
68 EsysException::~EsysException() THROW_ANY
69 {}
70
71 const std::string & EsysException::exceptionName() const
72 {
73 return exceptionNameValue;
74 }
75

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26