Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This discussion is extended and subsumed under Error Handling Phase Next

Description

Currently it is not easy to create custom exceptions in Clojure. This requires gen-class and thus AOT compilation with all its drawbacks. One approach to improve the situation was clojure.contrib.condition. It defines a custom exception – Condition – which may be equipped with arbitrary metadata. This makes it quite easy to handle errors with arbitrary context information without having to define custom errors.

Suggested improvements

Derive Condition from RuntimeException, not Throwable. (Laurent Petit)

...