/[escript]/trunk/escript/src/DomainException.h
ViewVC logotype

Annotation of /trunk/escript/src/DomainException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1455 - (hide annotations)
Thu Feb 28 17:19:44 2008 UTC (11 years, 10 months ago) by phornby
File MIME type: text/plain
File size: 2057 byte(s)
Merge of branches/windows_from_1431_trunk.

Revamp of the exception system.
Fix unused vars and signed/unsigned comparisons.
defined a macro THROW(ARG) in the system_dep.h's to
deal with the expectations of declarations on different architectures.

Details in the logs of branches/windows_from_1431_trunk.

pre-merge snapshot of the trunk in tags/trunk_at_1452


1 jgs 474
2 ksteube 1312 /* $Id$ */
3    
4     /*******************************************************
5 phornby 1455 *
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 ksteube 1312
16 jgs 82 #if !defined escript_DomainException_20040608_H
17     #define escript_DomainException_20040608_H
18 woo409 757 #include "system_dep.h"
19 jgs 82
20 robwdcock 682 #include "esysUtils/EsysException.h"
21 jgs 474
22 phornby 1455 namespace escript
23     {
24 jgs 82
25 phornby 1455 /**
26     \brief
27     DomainException exception class.
28 jgs 82
29 phornby 1455 Description:
30     DomainException exception class.
31     The class provides a public function returning the exception name
32     */
33     class DomainException : public esysUtils::EsysException
34     {
35 jgs 82
36 phornby 1455 protected:
37 jgs 82
38 phornby 1455 typedef EsysException Parent;
39 phornby 1020
40 phornby 1455 public:
41     /**
42     \brief
43     Default constructor for the exception.
44     */
45     ESCRIPT_DLL_API
46     DomainException() : Parent() { updateMessage();}
47     /**
48     \brief
49     Constructor for the exception.
50     */
51     ESCRIPT_DLL_API
52     DomainException(const char *cstr) : Parent(cstr) { updateMessage();}
53     /**
54     \brief
55     Constructor for the exception.
56     */
57     ESCRIPT_DLL_API
58     DomainException(const std::string &str) : Parent(str) { updateMessage();}
59     /**
60     \brief
61     Copy Constructor for the exception.
62     */
63     ESCRIPT_DLL_API
64     DomainException(const DomainException &other) : Parent(other)
65     {
66     updateMessage();
67     }
68 jgs 82
69 phornby 1455 /// Destructor
70     ESCRIPT_DLL_API
71     virtual ~DomainException() THROW() {}
72     /**
73     \brief
74     Returns the name of the exception.
75     */
76     ESCRIPT_DLL_API
77     virtual const std::string & exceptionName() const;
78    
79     private:
80    
81     //
82     // the exception name is immutable and class-wide.
83     // Inheritor note; you need one of these too.
84     // and an overloaded exceptionName() in your .cpp implementation file.
85     static const std::string exceptionNameValue;
86     };
87    
88 jgs 82 } // end of namespace
89     #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26