Is there a way for raising something and an exception that does not come from Exception?
What I'm trying to avoid is something like:
require 'timeout'
begin
timeout(1) {sleep(50)}
rescue StandardError => e
puts e.message
end
I know that I can catch it with the “Exclusion of salvation” or more decisively, “Rescue object”, but for me it is a little strange.
source
share