#include <iostream.h>
+#include <exception>
+
* @see DeclException0
* @author Wolfgang Bangerth, November 1997
*/
-class ExceptionBase {
+class ExceptionBase : public exception {
public:
ExceptionBase () :
file(""), line(0), function(""), cond(""), exc("") {};
* put it here.
*/
ExceptionBase (const ExceptionBase &e) :
+ exception(e),
file(e.file), line(e.line), function(e.function),
cond(e.cond), exc(e.exc) {};
* put it here.
*/
ExceptionBase & operator = (const ExceptionBase &e) {
- file = e.file;
- line = e.line;
+ file = e.file;
+ line = e.line;
function = e.function;
- cond = e.cond;
- exc = e.exc;
+ cond = e.cond;
+ exc = e.exc;
return *this;
};
};
+ /**
+ * Function derived from the base class
+ * which allows to pass information like
+ * the line and name of the file where the
+ * exception occured as well as user
+ * information.
+ *
+ * This function is mainly used when using
+ * exceptions declared by the
+ * #DeclException*# macros with the #throw#
+ * mechanism or the #Assert_or_Throw# macro.
+ */
+// virtual const char * what () const;
+
+
const char *file;
int line;
const char *function;
way.
*/
-#include <exception>
-
/**
* Exception class to be thrown whenever an I/O operation in the library