Merge pull request #10384 from MikeMcQuaid/exceptions-termsig
exceptions: more handling of nil status.
This commit is contained in:
commit
c7e9fdc839
@ -589,7 +589,7 @@ class ErrorDuringExecution < RuntimeError
|
||||
|
||||
reason = if exitstatus
|
||||
"exited with #{exitstatus}"
|
||||
elsif (uncaught_signal = status.termsig)
|
||||
elsif (uncaught_signal = status&.termsig)
|
||||
"was terminated by uncaught signal #{Signal.signame(uncaught_signal)}"
|
||||
else
|
||||
raise ArgumentError, "Status neither has `exitstatus` nor `termsig`."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user