Skip to content

Commit 8c73c82

Browse files
committed
use SystemError for crystal >= 0.34 compatiblility
1 parent 217e72d commit 8c73c82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentry.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ module Sentry
263263
file_changed = true if (app_process && !app_process.terminated?)
264264
end
265265
end
266-
rescue ex : Errno
266+
rescue ex : SystemError
267267
# The underlining lib for reading directories will fail very rarely, crashing Sentry
268268
# This catches that error and allows Sentry to carry on normally
269269
# https://github.com/crystal-lang/crystal/blob/59788834554399f7fe838487a83eb466e55c6408/src/errno.cr#L37
270-
unless ex.to_s == "readdir: Input/output error"
270+
unless ex.message == "readdir: Input/output error"
271271
raise ex
272272
end
273273
end

0 commit comments

Comments
 (0)