class DD_Exception

Class DD_Exception: Exceptions that can be thrown by the DD system calls.

Public Methods

[more] DD_Exception( int code, const char* msg = "")
Creator.
[more] ~DD_Exception()
Destructor
[more] DD_Exception( const DD_Exception& )
Copy constructor.
[more]void print()
Prints the error message

Public Members

[more]enum Enum of the error codes


Documentation

Class DD_Exception: Exceptions that can be thrown by the DD system calls. A DD exception consists of an error message, which is given by a static const char* variable. The errorcodes are enumerated and the array of error messages is sized to NUM_ERRORS+1 in order to handle an iCode which is invalid (i.e. > NUM_ERRORS).

The typical use of the code is:

   DD *my_dd;
   try {
     my_dd = pDDfactory->create_dd( dd_name, "w", dd_config_file );
   } catch ( DD_Exception &ex ) {
     cout << "Exception raised while creating DD system " << dd_name << endl;
     ex.print();
     delete &ex;
     exit(EXIT_FAILURE);
   }  
   

Note that the entire DD code can be compiled with -DDD_NOEXCEPTION, in which case no exceptions are present to allow backwards compatibility with older compilers such as IRIX 5.3.

o DD_Exception( int code, const char* msg = "")
Creator.
Parameters:
code - : integer specifiying the error code (look for the enum)
msg - an additional message that will be added to the default error message, separated by a ":"

o ~DD_Exception()
Destructor

o DD_Exception( const DD_Exception& )
Copy constructor. Copy constructor is needed to duplicate the private members which contains a string

ovoid print()
Prints the error message

oenum Enum of the error codes
Enum of the error codes


This class has no child classes.
Author:
C.Witzig
Date: Feb 14, 98
Version:
Last update Feb 14, 98

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.