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