Back to index

wims  3.65+svn20090927
ControlException.java
Go to the documentation of this file.
00001 /*
00002 $Id: ControlException.java,v 1.3 2003/02/18 11:48:46 sander Exp $
00003 */
00004 
00005 
00006 /*
00007 Copyright (C) 2001-2002 Mainline Project (I3S - ESSI - CNRS -UNSA)
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU Lesser General Public
00011 License as published by the Free Software Foundation; either
00012 version 2.1 of the License, or (at your option) any later version.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public
00020 License along with this library; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023 For further information on the GNU Lesser General Public License,
00024 see: http://www.gnu.org/copyleft/lesser.html
00025 For further information on this library, contact: mainline@essi.fr
00026 */
00027 
00028 
00029 package fr.ove.openmath.exceptions;
00030 
00031 import fr.ove.openmath.exceptions.*;
00032 
00040 public class ControlException extends ErrorMessageException {
00045     public ControlException(String symbol) {
00046         this(symbol, null);
00047     }
00048 
00054     public ControlException(String symbol, Object details) {
00055         super(symbol, details);
00056 
00057         if (symbol.equals("unhandledSymbol"))
00058             setErrorMessage("Symbol Unhandled by the Application");
00059         else if (symbol.equals("unknownSymbol"))
00060             setErrorMessage("The Symbol does not Exist in the Specified CD");
00061         else if (symbol.equals("unknownCD"))
00062             setErrorMessage("The Specified CD is not Handled by the Application");
00063         else if (symbol.equals("algorithm"))
00064             setErrorMessage("Operation not or Partially Implemented");
00065         else if (symbol.equals("limitation"))
00066             setErrorMessage("Implementation Limitation");
00067         else if (symbol.equals("unexpected"))
00068             setErrorMessage("Unexpected Problem");
00069         else if (symbol.equals("system"))
00070             setErrorMessage("System Error");
00071         else if (symbol.equals("terminated"))
00072             setErrorMessage("Communication Terminted. Server Shutted Down");
00073         else if (symbol.equals("commandOk"))
00074             setErrorMessage("Command Successfully Executed");
00075         else if (symbol.equals("encodingError"))
00076             setErrorMessage("Lexical and/or Syntactic Error Detected");
00077         else if (symbol.equals("semanticError"))
00078             setErrorMessage("Semantic Error Detected");
00079     }
00080 }