mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
Handle more MJIT compilation failures
NotImplementedError is not part StandardError, for example. When that kind of exception happens, current_cc_unit remains not NULL, and mjit_finish ends up waiting for 5 seconds, which is inconvenient.
This commit is contained in:
parent
2652bc3578
commit
f500ca9b8a
1 changed files with 2 additions and 2 deletions
|
@ -43,9 +43,9 @@ module RubyVM::MJIT
|
||||||
C.fprintf(f, "\n} // end of #{funcname}\n")
|
C.fprintf(f, "\n} // end of #{funcname}\n")
|
||||||
|
|
||||||
return success
|
return success
|
||||||
rescue => e # Should rb_rescue be called in C?
|
rescue Exception => e # should we use rb_rescue in C instead?
|
||||||
if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
|
if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
|
||||||
$stderr.puts e.full_message
|
$stderr.puts "MJIT error: #{e.full_message}"
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue