Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > XML Reference

up

WOXMLException


Inherits from:
a private class that itself inherits : from RuntimeException
Package:
com.apple.webobjects.xml


Class Description


This class serves solely 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 by WOXMLDecoder and then re-thrown.

The WOXMLException class encapsulates both an exception and an optional text string that can be retrieved with getMessage (this message is also prepended to the text that is returned from toString).




Constructors



WOXMLException

public WOXMLException(String optionalMessage)

public WOXMLException(Throwable anException)

public WOXMLException(Throwable anException, String optionalMessage)

Creates and returns a new WOXMLException object. If optionalMessage is included, the message text can later be retrieved with getMessage and is prepended to the string returned from toString. If anException is supplied, the string returned by toString lists (among other things) anException's class.




Instance Methods



getMessage

public String getMessage()

Returns the optional message supplied when the WOXMLException was created, followed by any optional message from the encapsulated exception.



toString

public String toString()

Returns a string representation of the WOXMLException object, including the optionalMessage (if one was supplied when the WOXMLException was created) and the name of the encapsulated exception.




up