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

Contents of /trunk/escript/src/SystemMatrixException.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1455 - (show annotations)
Thu Feb 28 17:19:44 2008 UTC (11 years, 9 months ago) by phornby
File MIME type: text/plain
File size: 2138 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
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_SystemMatrixException_20040608_H
17 #define escript_SystemMatrixException_20040608_H
18
19 #include "system_dep.h"
20 #include "esysUtils/EsysException.h"
21
22 namespace escript
23 {
24
25 /**
26 \brief
27 SystemMatrixException exception class.
28
29 Description:
30 SystemMatrixException exception class.
31 The class provides a public function returning the exception name
32 */
33 class SystemMatrixException : public esysUtils::EsysException
34 {
35
36 protected:
37
38 typedef EsysException Parent;
39
40 public:
41 /**
42 \brief
43 Default constructor for the exception.
44 */
45 ESCRIPT_DLL_API
46 SystemMatrixException() : Parent() { updateMessage();}
47 /**
48 \brief
49 Constructor for the exception.
50 */
51 ESCRIPT_DLL_API
52 SystemMatrixException(const char *cstr) : Parent(cstr) { updateMessage();}
53 /**
54 \brief
55 Constructor for the exception.
56 */
57 ESCRIPT_DLL_API
58 SystemMatrixException(const std::string &str) :
59 Parent(str) { updateMessage();}
60 /**
61 \brief
62 Copy Constructor for the exception.
63 */
64 ESCRIPT_DLL_API
65 SystemMatrixException(const SystemMatrixException &other) : Parent(other)
66 {
67 updateMessage();
68 }
69
70 /// Destructor
71 ESCRIPT_DLL_API
72 virtual ~SystemMatrixException() THROW() {}
73 /**
74 \brief
75 Returns the name of the exception.
76 */
77 ESCRIPT_DLL_API
78 virtual const std::string & exceptionName() const;
79
80 private:
81
82 //
83 // the exception name is immutable and class-wide.
84 // Inheritor note; you need one of these too.
85 // and an overloaded exceptionName() in your .cpp implementation file.
86 static const std::string exceptionNameValue;
87 };
88
89 } // end of namespace
90 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26