COPASI API  4.16.103
StdException.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/StdException.h,v $
3  $Revision: 1.2 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2006/04/27 01:31:21 $
7  End CVS Header */
8 
9 // Copyright 2005 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc. and EML Research, gGmbH.
11 // All rights reserved.
12 
13 #ifndef STDEXCEPTION_H__
14 #define STDEXCEPTION_H__
15 
16 #include <string>
17 #include <exception>
18 
19 /**
20  * Simple exception class that implements the what() function of std::exception
21  * to specify an error message.
22  */
23 class StdException: public std::exception
24  {
25  public:
26  /**
27  * Constructor that sets the error message object to "Error."
28  */
29  StdException() throw();
30 
31  /**
32  * Constructor that sets the error message object to the string given.
33  */
34  explicit StdException(const std::string what) throw();
35 
36  /**
37  * Destructor that does nothing.
38  */
39  virtual ~StdException() throw();
40 
41  /**
42  * Returns the error message object as a character array.
43  */
44  virtual const char* what() const throw();
45 
46  protected:
47  std::string message;
48  };
49 
50 #endif
std::string message
Definition: StdException.h:47
virtual const char * what() const
virtual ~StdException()