]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add ExcMessage.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Jan 2001 12:57:32 +0000 (12:57 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Jan 2001 12:57:32 +0000 (12:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@3832 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h

index 1632040b9e0a3f8a55f5eb526a63370c144b1090..626f115fc3d72793ee17c865cdc55d2186feced4 100644 (file)
@@ -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);
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.