(ex-data ex)
Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.
(defn ex-data [ex] (when (instance? ExceptionInfo ex) (.-data ex)))