/[escript]/branches/windows_from_1431_trunk/esysUtils/src/EsysAssertException.h
ViewVC logotype

Contents of /branches/windows_from_1431_trunk/esysUtils/src/EsysAssertException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1439 - (show annotations)
Thu Feb 28 04:56:16 2008 UTC (13 years, 9 months ago) by trankine
File MIME type: text/plain
File size: 1815 byte(s)
Working to eliminate stringstreams from exceptions.
All exception methods return const refs to self-owned members.
(i.e. no temporaries allowed after construction.)

Not compiling, this is a lunch break checkin.

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 #if !defined escript_EsysAssertException_20040330_H
17 #define escript_EsysAssertException_20040330_H
18 #include "system_dep.h"
19
20 #include "EsysException.h"
21
22 #include <string>
23
24 namespace esysUtils {
25
26 /**
27 \brief
28 EsysAssertException exception class.
29
30 Description:
31 EsysAssertException exception class.
32 The class provides a public function returning the exception name.
33 */
34 class EsysAssertException : public EsysException
35 {
36
37 public:
38
39 /**
40 \brief
41 Default constructor for the exception.
42 */
43 EsysAssertException() : EsysException() {}
44
45 /**
46 \brief
47 Constructor for the exception.
48 */
49 EsysAssertException(const char *cstr) : EsysException(cstr) {}
50
51 /**
52 \brief
53 Constructor for the exception.
54 */
55 EsysAssertException(const std::string &str) : EsysException(str) {}
56
57 /// Destructor
58 virtual ~EsysAssertException() {}
59
60 /**
61 \brief
62 Returns the name of the exception.
63 */
64 virtual const std::string & exceptionName() const;
65
66 /**
67 \brief
68 Builds a formatted message and throws an EsysAssertException.
69 */
70 static void assertFailure (const std::string& assertion,
71 const std::string& date,
72 const std::string& file,
73 int line, const std::string& errDesc);
74 };
75
76 } // end of namespace
77
78 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26