/[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 1449 - (show annotations)
Thu Feb 28 13:40:48 2008 UTC (12 years, 4 months ago) by phornby
File MIME type: text/plain
File size: 2082 byte(s)
Have to go to another machine, my editor keeps crashing....


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 namespace esysUtils {
23
24 /**
25 \brief
26 EsysAssertException exception class.
27
28 Description:
29 EsysAssertException exception class.
30 The class provides a public function returning the exception name.
31 */
32 class EsysAssertException : public EsysException
33 {
34
35 protected:
36
37 typedef EsysException Parent;
38
39 public:
40
41 /**
42 \brief
43 Default constructor for the exception.
44 */
45 EsysAssertException() : Parent() {}
46
47 /**
48 \brief
49 Constructor for the exception.
50 */
51 EsysAssertException(const char *cstr) : Parent(cstr) {}
52
53 /**
54 \brief
55 Constructor for the exception.
56 */
57 EsysAssertException(const std::string &str) : Parent(str) {}
58
59 /// Destructor
60 virtual ~EsysAssertException() THROW() {}
61
62 /**
63 \brief
64 Returns the name of the exception.
65 */
66 virtual const std::string & exceptionName() const;
67
68 /**
69 \brief
70 Builds a formatted message and throws an EsysAssertException.
71 */
72 static void assertFailure (const std::string& assertion,
73 const std::string& date,
74 const std::string& file,
75 int line, const std::string& errDesc);
76 private:
77
78 //
79 // the exception name is immutable and class-wide.
80 // Inheritor note; you need one of these too.
81 // and an overloaded exceptionName() in your .cpp implementation file.
82 static const std::string exceptionNameValue;
83 };
84
85 } // end of namespace
86
87 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26