From a91a44c9ede52b13a802a7aa2690d2a7f1170880 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 11 Mar 2011 09:43:44 -0800 Subject: [PATCH] Fixed errors thrown in .onerror --- src/Image.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Image.cc b/src/Image.cc index 7704820..102f9d2 100644 --- a/src/Image.cc +++ b/src/Image.cc @@ -229,8 +229,12 @@ Image::error(TryCatch &try_catch) { FatalException(try_catch); } else { Local argv[1] = { try_catch.Exception() }; + TryCatch try_catch2; onerror->Call(Context::GetCurrent()->Global(), 1, argv); onerror.Dispose(); + if (try_catch2.HasCaught()) { + FatalException(try_catch2); + } } }