Class DryRotException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--DryRotException
All Implemented Interfaces:
java.io.Serializable

public class DryRotException
extends java.lang.Exception

Class to implement DRYROT messages for MAExplorer. DRYROT messages are fatal errors that indicates either that something is wrong with the program, bad or corrupted data structures etc. Since you can not continue, it passes the information to a Dryrot report method that pops up a Dialog box for the user and suggests they mail the code author with the saved error message and MAExplorer state.

At the point in a method when you want to throw a DryRotException, use the syntax "throw new DryRotException(msg);" and specify in the parameter a String of useful information.

Any method that contains a throw must have a try block to catch this exception or "Exception" itself or throw the exception to the next method.

Thus for DryRotException,

   class Example
     {
       public void myMethod () throws DryRotException 
         {
           throw new DryRotException("Line 22 of Foo class had a bad var");
         }

       public static void main (String [] args)
         {
          try 
            {
              Example o = new Example();
              o.myMethod();
            } 
          catch (DryRotException e)
            {
              System.out.print("Exception: "+e);
            }
        }
  }
 
[JE Created on December 19, 2001, 2:15 PM, Version 1.0]

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2002/10/14 20:17:18 $ $Revision: $
Author:
Jai Evans (DECA/CIT), P. Lemkin (NCI), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, Serialized Form

Fields inherited from class java.lang.Throwable
backtrace, detailMessage, serialVersionUID
 
Constructor Summary
DryRotException()
          DryRotException() - constructor to create new DryRotException without detail message.
DryRotException(java.lang.String msg)
          Constructs an DryRotException with the specified detail message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, printStackTrace0, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

DryRotException

public DryRotException()
DryRotException() - constructor to create new DryRotException without detail message.

DryRotException

public DryRotException(java.lang.String msg)
Constructs an DryRotException with the specified detail message.
Parameters:
msg - the detail message.