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