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