From 627ece395b6db7deafcdec0c1d9498c1192c392e Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 30 Jan 2001 12:57:32 +0000 Subject: [PATCH] Add ExcMessage. git-svn-id: https://svn.dealii.org/trunk@3832 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/exceptions.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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); }; -- 2.39.5