home *** CD-ROM | disk | FTP | other *** search
- package sub_arctic.lib;
-
- /**
- * This class is the only throwable object used by the sub_arctic
- * infrastructure. This class is derived from java.lang.Error so one need
- * no declare it in the <B>throws</B> clause of methods or
- * always catch it. <P>
- *
- * Originally, sub_arctic had many times of exceptions (not errors)
- * which were all derived from an exception called general.
- * This proved problematic in early use of sub_arctic and was taken
- * out before the public release. The main difficulty was that
- * all of the system's exceptions were not really recoverable, but
- * rather it was always the case that user code simply detected
- * the problem an exited. Thus, it was nothing but an annoyance to
- * be declaring these exceptions everywhere and catching them, so
- * the whole mechanism was removed and replaced with the current one.
- *
- * @author Ian Smith
- */
-
- public class sub_arctic_error extends Error {
- /**
- * Construct a new sub_arctic_error with a string. This should only
- * be done when an abnormal and basically fatal error occurs.
- * @param String errmsg the error message detailing the problem that occurred
- */
- public sub_arctic_error(String errmsg) {
- super(errmsg);
- }
- /**
- * Print a stack trace and exit with non-zero status value.
- */
- public void crash() {
- printStackTrace(System.err);
- System.exit(1);
- }
- /**
- * Print a stack trace and exit with the given status value.
- * @param int code the status value to pass to exit().
- */
- public void crash(int code) {
- printStackTrace(System.err);
- System.exit(code);
- }
- /**
- * Create a new sub_arctic_error with no string message. This is
- * probably only useful when you are just creating the error
- * for the purpose of calling some method on it.
- */
- public sub_arctic_error() {
- super();
- }
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-