Class WrappedException

All Implemented Interfaces:
ExtraInfo, Serializable

public class WrappedException extends RuntimeException implements ExtraInfo

A wrapped exception may be used to rethrow checked exceptions in a context where they are otherwise not allowed.

This could be accomplished by rethrowing with RuntimeException directly, but having this distinct class provides more meaning as well as the ability to catch wrapped exceptions while letting all other runtime exceptions go through directly.

Catching WrappedException may be used to unwrap expected throwable types.

Author:
AO Industries, Inc.
See Also: