Add ex-message and ex-cause functions to extract the message and cause exception respectively (similar to ex-data). These were added to ClojureScript in CLJS-429 and having them in Clojure as well makes these functions portable in cross-platform error handling code.
Screened by: Alex Miller
The attached patch implements ex-message and ex-cause to work on arbitrary Throwables.
This exists in ClojureScript. It would be really useful to have it in Clojure for cross-platform development.
Patch clj-1120-v2.patch is identical to Michal's 0001-CLJ-1120-ex-message-ex-cause.patch, except that it changes "added" metadata to Clojure version 1.10, and removes the "Alpha - subject to change" from the doc string, since the corresponding ClojureScript functions seemed to have removed such messages some time ago. Retained attribution and Michal's original patch creation date & time.