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

@param cause       the Throwable to convert
@param message the specified detail message

@return a KbTypeException