code: public static KbTypeException fromThrowable(Throwable cause) {
      return (cause instanceof KbTypeException)
                     ? (KbTypeException) cause
                     : new KbTypeException(cause);
    }
docs: Converts a Throwable to a KbTypeException. If the Throwable is a
  KbTypeException, it will be passed through unmodified; otherwise, it will be wrapped
  in a new KbTypeException.
  
  @param cause the Throwable to convert
  
  @return a KbTypeException