sethtrain / raven-clj

A Clojure interface to Sentry
84 stars 29 forks source link

Fix NPE if a frame's file path is nil #14

Closed mikeclarke closed 8 years ago

mikeclarke commented 8 years ago

I've encountered a situation where :class-path-url is unset for one of the frames in my stack trace, which causes a NullPointerException when file->source is called with nil for the file-path argument. io/resource handles some cases gracefully where the argument is an empty string or a file that doesn't exist (returning nil) but it blows up if passed nil directly. This patch is a small tweak that bails early if the input itself is nil.

martinklepsch commented 8 years ago

released with 1.4.3. Thank you 👍