From adfe16d4285d3b989df9ad919c6690b0f2b77036 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 15 Jun 2010 23:05:40 +0300 Subject: [PATCH] don't catch SystemExit, NoMemoryError --- lib/v8/function.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/v8/function.rb b/lib/v8/function.rb index afa162d..39c2e13 100644 --- a/lib/v8/function.rb +++ b/lib/v8/function.rb @@ -29,9 +29,14 @@ module V8 begin To.v8(rubycode.call(*args)) rescue Exception => e - error = V8::C::Exception::Error(V8::C::String::New(e.message)) - error.SetHiddenValue("TheRubyRacer::Cause", C::External::New(e)) - V8::C::ThrowException(error) + case e + when SystemExit, NoMemoryError + raise e + else + error = V8::C::Exception::Error(V8::C::String::New(e.message)) + error.SetHiddenValue("TheRubyRacer::Cause", C::External::New(e)) + V8::C::ThrowException(error) + end end end end