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