/**
* @file
* Here, the deal.II exception handling is located.
- */
+ */
#include <base/config.h>
* Default constructor.
*/
ExceptionBase ();
-
+
/**
* The constructor takes the file in which the
* error happened, the line and the violated
* Copy constructor.
*/
ExceptionBase (const ExceptionBase &exc);
-
+
/**
* Destructor. Empty, but needed
* for the sake of exception
* objects.
*/
virtual ~ExceptionBase () throw();
-
+
/**
* Set the file name and line of where the
* exception appeared as well as the violated
const char *func,
const char *c,
const char *e);
-
+
/**
* Print out the general part of the error
* information.
/**
* In this namespace functions in connection with the Assert and
* AssertThrow mechanism are declared.
- *
+ *
* @ingroup Exceptions
*/
namespace deal_II_exceptions
* exact setup of a machine.
*/
void suppress_stacktrace_in_exceptions ();
-
+
/**
* Calling this function switches off
* the use of std::abort() when an
* and AssertThrow mechanism but are solely for internal purposes and
* are not for use outside the exception handling and throwing
* mechanism.
- *
+ *
* @ingroup Exceptions
*/
namespace internals
const char *cond,
const char *exc_name,
ExceptionBase &e);
-
+
/**
* This routine does the main work for the
e.set_fields (file, line, function, cond, exc_name);
throw e;
}
-
+
/**
* Relay exceptions from the <tt>Assert</tt> macro to the
{
issue_error_assert (file,line,function,cond,exc_name,e);
}
-
+
/**
void abort ();
}
-
+
}
+#ifndef DOXYGEN
/**
* Declare an exception class derived from ExceptionBase without parameters.
const type5 arg5; \
}
+#else // ifndef DOXYGEN
+
+
+/**
+ * Declare an exception class derived from ExceptionBase without parameters.
+ * @author Wolfgang Bangerth, November 1997
+ * @ingroup Exceptions
+ */
+#define DeclException0(Exception0) \
+ static dealii::ExceptionBase& Exception0 ()
+
+
+
+/**
+ * Declare an exception class derived from ExceptionBase with
+ * one additional parameter.
+ * @ingroup Exceptions
+ */
+#define DeclException1(Exception1, type1, outsequence) \
+ static dealii::ExceptionBase& Exception1 (type1 arg1) throw (errortext outsequence)
+
+
+
+/**
+ * Declare an exception class derived from ExceptionBase with
+ * two additional parameters.
+ * @ingroup Exceptions
+ */
+#define DeclException2(Exception2, type1, type2, outsequence) \
+ static dealii::ExceptionBase& Exception2 (type1 arg1, type2 arg2) throw (errortext outsequence)
+
+
+
+/**
+ * Declare an exception class derived from ExceptionBase with
+ * three additional parameters.
+ * @ingroup Exceptions
+ */
+#define DeclException3(Exception3, type1, type2, type3, outsequence) \
+ static dealii::ExceptionBase& Exception3 (type1 arg1, type2 arg2, type3 arg3) throw (errortext outsequence)
+
+
+
+/**
+ * Declare an exception class derived from ExceptionBase with
+ * four additional parameters.
+ * @ingroup Exceptions
+ */
+#define DeclException4(Exception4, type1, type2, type3, type4, outsequence) \
+ static dealii::ExceptionBase& Exception4 (type1 arg1, type2 arg2, type3 arg3, type4 arg4) throw (errortext outsequence)
+
+
+/**
+ * Declare an exception class derived from ExceptionBase with
+ * five additional parameters.
+ * @ingroup Exceptions
+ */
+#define DeclException5(Exception5, type1, type2, type3, type4, type5, outsequence) \
+ static dealii::ExceptionBase& Exception5 (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) throw (errortext outsequence)
+
+#endif
/**
*
* @ingroup Exceptions
*/
-namespace StandardExceptions
+namespace StandardExceptions
{
/**
* @addtogroup Exceptions
*/
//@{
-
+
/**
* Exception denoting a division by
* zero.
DeclException1 (ExcMemoryLeak, int,
<< "Destroying memory handler while " << arg1
<< " objects are still allocated");
-
+
/**
* An error occurred reading or
* writing a file.
* suitable for this operation.
*/
DeclException0 (ExcInvalidState);
-
+
/**
* This exception is raised if a
* functionality is not possible in
* not be here.
*/
DeclException0(ExcZero);
-
+
/**
* The object should have been
* filled with something before
* this member function is called.
*/
DeclException0(ExcEmptyObject);
-
+
/**
* This exception is raised
* whenever the sizes of two
DeclException2 (ExcLowerRange, int, int,
<< "Number " << arg1
<< " must be larger or equal " << arg2);
-
+
/**
* This exception indicates that
* the first argument should be an
<< "Division " << arg1
<< " by " << arg2
<< " has remainder different from zero");
-
+
/**
* This exception is thrown if the
* iterator you access has
* yield an invalid iterator.
*/
DeclException0 (ExcInvalidIterator);
-
+
/**
* This exception is thrown if the
* iterator you incremented or
* final state.
*/
DeclException0 (ExcIteratorPastEnd);
-
+
/**
* This exception works around a
* design flaw in the
* if it is actually included.
*/
DeclException0 (ExcNeedsBLAS);
-
+
/**
* This function requires the LAPACK
* library. Please reconfigure
* if it is actually included.
*/
DeclException0 (ExcNeedsLAPACK);
-
+
/**
* This function requires the UMFPack
* library. Please reconfigure
* if it is actually included.
*/
DeclException0 (ExcNeedsUMFPACK);
-
+
/**
* This function requires the METIS
* library. Please reconfigure
* if it is actually included.
*/
DeclException0 (ExcNeedsMETIS);
-
+
/**
* This function requires the Petsc
* library. Please reconfigure
* if it is actually included.
*/
DeclException0 (ExcNeedsPETSC);
-
+
/**
* This function requires the
* NetCDF library, which is neither
<< "This feature was disabled by the "
"configuration option --disable-"
<< arg1 << ". Reconfigure to use it!");
-
+
//@}
}