diff options
Diffstat (limited to 'gin')
-rw-r--r-- | gin/runner.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gin/runner.cc b/gin/runner.cc index a3c9544..46671c5 100644 --- a/gin/runner.cc +++ b/gin/runner.cc @@ -57,14 +57,12 @@ void Runner::Run(const std::string& script) { } void Runner::Run(v8::Handle<Script> script) { + TryCatch try_catch; delegate_->WillRunScript(this, script); - { - TryCatch try_catch; - script->Run(); - if (try_catch.HasCaught()) - delegate_->UnhandledException(this, try_catch); - } + script->Run(); delegate_->DidRunScript(this, script); + if (try_catch.HasCaught()) + delegate_->UnhandledException(this, try_catch); } Runner::Scope::Scope(Runner* runner) |