From: Wolfgang Bangerth Date: Tue, 30 Jan 2001 12:57:32 +0000 (+0000) Subject: Add ExcMessage. X-Git-Tag: v8.0.0~19759 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69698442dfc42729decaf6b06fd24231d5db916e;p=dealii.git Add ExcMessage. git-svn-id: https://svn.dealii.org/trunk@3832 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/exceptions.h b/deal.II/base/include/base/exceptions.h index 1632040b9e..626f115fc3 100644 --- a/deal.II/base/include/base/exceptions.h +++ b/deal.II/base/include/base/exceptions.h @@ -756,7 +756,26 @@ namespace StandardExceptions DeclException3 (ExcIndexRange, int, int, int, << "Index " << arg1 << " is not in [" << arg2 << "," << arg3 << "["); - + + /** + * This exception works around a + * design flaw in the + * @p{DeclException0} macro: that + * does not allow one to specify a + * message that is displayed when + * the exception is raised, as + * opposed to the other exceptions + * which allow to show a text along + * with the given parameters. + * + * When throwing this exception, + * you can give a message as a + * string or @p{char*} as argument + * to the exception that is then + * displayed. + */ + DeclException1 (ExcMessage, string, + << arg1); };