public static SessionManagerConfigurationException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionManagerConfigurationException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionManagerConfigurationException ) cause : new SessionManagerConfigurationException ( message , cause ) ; }
Converts a Throwable to a SessionManagerConfigurationException with the specified detail message . If the Throwable is a SessionManagerConfigurationException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionManagerConfigurationException with the detail message .