public static SessionRuntimeException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionRuntimeException ) ? ( SessionRuntimeException ) cause : new SessionRuntimeException ( cause ) ; }
Converts a Throwable to a SessionRuntimeException . If the Throwable is a SessionRuntimeException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionRuntimeException .