showThrowable :: Throwable -> String
@private
@JavaName getMessage
- getMessageThrowable :: Throwable -> String
+ getMessageThrowable :: Throwable -> Maybe String
@private
@JavaName getCause
getCauseThrowable :: Throwable -> Maybe Throwable
toThrowable :: e -> Throwable
messageOfException :: Throwable e => e -> String
-messageOfException = getMessageThrowable . toThrowable
+messageOfException e = match getMessageThrowable $ toThrowable e with
+ Just m -> m
+ Nothing -> ""
+
+possibleMessageOfException :: Throwable e => e -> Maybe String
+possibleMessageOfException e = getMessageThrowable $ toThrowable e
causeOfException :: Throwable e => e -> Maybe Throwable
causeOfException = getCauseThrowable . toThrowable