Index: gin/runner.cc |
diff --git a/gin/runner.cc b/gin/runner.cc |
index a3c9544872954967a3dd99197cb554a2574b0544..46671c592a1e7caf4c98b285c14e97dc112ab8b4 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) |