diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-15 00:18:12 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-15 00:18:13 -0800 |
commit | f500ca9b8a62599433f7087fe1da30ec16e3564c (patch) | |
tree | 8cf8369c5754ac2e962673a714ae9328e2f74896 /lib | |
parent | 2652bc3578b79dbe9b3b28d4ee67b3729789cc61 (diff) | |
download | ruby-f500ca9b8a62599433f7087fe1da30ec16e3564c.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mjit/compiler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mjit/compiler.rb b/lib/mjit/compiler.rb index 734e33e59f..806e7f55c4 100644 --- a/lib/mjit/compiler.rb +++ b/lib/mjit/compiler.rb @@ -43,9 +43,9 @@ module RubyVM::MJIT C.fprintf(f, "\n} // end of #{funcname}\n") 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 - $stderr.puts e.full_message + $stderr.puts "MJIT error: #{e.full_message}" end return false end |