Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.channels.error.error2xml
Interface IThrowableToElement

All Known Implementing Classes:
  AuthorizationExceptionToElement, DelegatingThrowableToElement, InternalTimeoutExceptionToElement, ResourceMissingExceptionToElement, ThrowableToElement

    public interface IThrowableToElement

Interface for translating from a Throwable to an Element.

Since:
  uPortal 2.5
Version:
  $Revision: 1.2 $ $Date: 2005/04/17 20:54:00 $
Author:
  andrew.petro@yale.edu

Method Summary
`boolean` | `supports(java.lang.Class c)` Returns true if the implementation knows how to translate an instance of the given class into an Element (throwableToElement() will return non-null) for instances of the class, which must extend Throwable).
`org.w3c.dom.Element` | `throwableToElement(java.lang.Throwable t, org.w3c.dom.Document parentDoc)` Obtain an Element representing the throwable.

Method Detail

### throwableToElement

    org.w3c.dom.Element throwableToElement(java.lang.Throwable t,
                                           org.w3c.dom.Document parentDoc)
                                           throws java.lang.IllegalArgumentException

  Obtain an Element representing the throwable. Throws IllegalArgumentException if t is null. Throws IllegalArgumentException if t is not supported, as indicated by the supports() method.

  Parameters:
    `t` - a supported throwable
    `parentDoc` - document into which the element is to go
  Returns:
    an Element representing the Element
  Throws:
    `java.lang.IllegalArgumentException` - if t is null.
    `java.lang.IllegalArgumentException` - if t is unsupported.

### supports

    boolean supports(java.lang.Class c)
                     throws java.lang.IllegalArgumentException

  Returns true if the implementation knows how to translate an instance of the given class into an Element (throwableToElement() will return non-null) for instances of the class, which must extend Throwable). Returns false if the implementation will return null for throwableToNode() on an instance of the class. Throws IllegalArgumentException if c is not a class which extends Throwable. Throws IllegalArgumentException if c is null.

  Parameters:
    `c` - a Class extending Throwable
  Returns:
    true if handles instances of c, false otherwise
  Throws:
    `java.lang.IllegalArgumentException` - if c is null or does not extend Throwable

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD