View Javadoc

1   package fr.ove.openmath.exceptions;
2   
3   import fr.ove.openmath.exceptions.*;
4   
5   /***
6   * Specific Mfd2 exception to specialize treatment of errors according
7   * to the symbol that thrown it.
8   *
9   * @author © 1998 DIRAT Laurent
10  * @version 1.0  13/04/99
11  */
12  public class Mfd2Exception extends ErrorMessageException {
13      /***
14      * The constructor.
15      * @param symbol The symbol which thrown the instance.
16      */
17      public Mfd2Exception(String symbol) {
18          this(symbol, null);
19      }
20  
21      /***
22      * The constructor.
23      * @param symbol the symbol which thrown the instance.
24      * @param details the details of the exception
25      */
26      public Mfd2Exception(String symbol, Object details) {
27          super(symbol, details);
28  
29          if (symbol.equals("dontknow"))
30              setErrorMessage("can't accomplish the request");
31          else if (symbol.equals("wrongRequest"))
32              setErrorMessage("error in the request");
33      }
34  }