Index: src/debug-delay.js |
diff --git a/src/debug-delay.js b/src/debug-delay.js |
index 3bf1061df0271dfa8484d266527a7d87825524b9..5ba5a3bb7367f52253e772688cc8b7359d2db6ee 100644 |
--- a/src/debug-delay.js |
+++ b/src/debug-delay.js |
@@ -1986,9 +1986,18 @@ DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response) |
} |
var change_log = new Array(); |
- Debug.LiveEditChangeScript(the_script, change_pos, change_len, new_string, |
- change_log); |
- |
+ try { |
+ Debug.LiveEditChangeScript(the_script, change_pos, change_len, new_string, |
+ change_log); |
+ } catch (e) { |
+ if (e instanceof Debug.LiveEditChangeScript.Failure) { |
+ // Let's treat it as a "success" so that body with change_log will be |
+ // sent back. "change_log" will have "failure" field set. |
+ change_log.push( { failure: true } ); |
+ } else { |
+ throw e; |
+ } |
+ } |
response.body = {change_log: change_log}; |
}; |