public static DeleteException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof DeleteException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( DeleteException ) cause : new DeleteException ( message , cause ) ; }
Converts a Throwable to a DeleteException with the specified detail message . If the Throwable is a DeleteException 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 DeleteException with the detail message .