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