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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1441 - (hide annotations)
Thu Feb 28 06:50:26 2008 UTC (13 years, 9 months ago) by trankine
File MIME type: text/plain
File size: 2045 byte(s)
We have a successful compile & link of escript & esysUtils.
1 ksteube 1312
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 jgs 102 #if !defined escript_EsysAssertException_20040330_H
17 jgs 82 #define escript_EsysAssertException_20040330_H
18 woo409 757 #include "system_dep.h"
19 jgs 82
20 jgs 468 #include "EsysException.h"
21 jgs 82
22     namespace esysUtils {
23    
24 trankine 1439 /**
25     \brief
26     EsysAssertException exception class.
27 jgs 82
28 trankine 1439 Description:
29     EsysAssertException exception class.
30     The class provides a public function returning the exception name.
31     */
32     class EsysAssertException : public EsysException
33     {
34 jgs 82
35 trankine 1439 public:
36 jgs 102
37 trankine 1439 /**
38     \brief
39     Default constructor for the exception.
40     */
41     EsysAssertException() : EsysException() {}
42 jgs 102
43 trankine 1439 /**
44     \brief
45     Constructor for the exception.
46     */
47     EsysAssertException(const char *cstr) : EsysException(cstr) {}
48 jgs 102
49 trankine 1439 /**
50     \brief
51     Constructor for the exception.
52     */
53     EsysAssertException(const std::string &str) : EsysException(str) {}
54 jgs 102
55 trankine 1439 /// Destructor
56     virtual ~EsysAssertException() {}
57 phornby 1020
58 trankine 1439 /**
59     \brief
60     Returns the name of the exception.
61     */
62     virtual const std::string & exceptionName() const;
63 jgs 102
64 trankine 1439 /**
65     \brief
66     Builds a formatted message and throws an EsysAssertException.
67     */
68     static void assertFailure (const std::string& assertion,
69     const std::string& date,
70     const std::string& file,
71     int line, const std::string& errDesc);
72 trankine 1441 private:
73    
74     //
75     // the exception name is immutable and class-wide.
76     // Inheritor note; you need one of these too.
77     // and an overloaded exceptionName() in your .cpp implementation file.
78     static const std::string exceptionNameValue;
79 trankine 1439 };
80 jgs 82
81     } // end of namespace
82 jgs 468
83 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26