WebObjects 5.2.3

com.webobjects.appserver.xml
Class WOXMLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.webobjects.foundation.NSForwardException
                  extended bycom.webobjects.appserver.xml.WOXMLException
All Implemented Interfaces:
Serializable

public class WOXMLException
extends NSForwardException

This class serves to wrap a number of exceptions that can arise during the parsing process, reducing the number of exceptions your code has to catch. In particular, exceptions that are thrown by the SAX parser are encapsulated in WOXMLException objects and then re-thrown.

See Also:
Serialized Form

Constructor Summary
WOXMLException(String extraMessage)
          Creates a WOXMLException that contains an exception message.
WOXMLException(Throwable wrapped)
          Creates a WOXMLException that wraps an exception.
WOXMLException(Throwable wrapped, String extraMessage)
          Creates a WOXMLException that wraps an exception and an extra text string.
 
Method Summary
 String getMessage()
          Gets the error message string of this exception object.
 String toString()
          Returns a short description of this exception object.
 
Methods inherited from class com.webobjects.foundation.NSForwardException
originalException, printStackTrace, printStackTrace, printStackTrace, stackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WOXMLException

public WOXMLException(Throwable wrapped,
                      String extraMessage)
Creates a WOXMLException that wraps an exception and an extra text string. The text string is prepended to the eventual exception message retrieved.

Parameters:
wrapped - an exception that needs to be wrapped in this exception
extraMessage - an extra text string explaining the exception further

WOXMLException

public WOXMLException(Throwable wrapped)
Creates a WOXMLException that wraps an exception.

Parameters:
wrapped - an exception that needs to be wrapped in this exception

WOXMLException

public WOXMLException(String extraMessage)
Creates a WOXMLException that contains an exception message.

Parameters:
extraMessage - an extra text string explaining the exception
Method Detail

getMessage

public String getMessage()
Gets the error message string of this exception object.

Returns:
the error message string of this object; if the object was created with an extra text string, it will be prepended to the original error message; null is return if there is no error message at all.

toString

public String toString()
Returns a short description of this exception object. If this object was created with an extra error message string, then the result is the concatenation of 2 strings:

Overrides:
toString in class NSForwardException
Returns:
a string representation of this exception

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.