Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 369333002: DevTools: Added error message when the command is invoked from the console with exception (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add-evaluate-exception-details
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('k') | Source/devtools/front_end/sdk/RuntimeModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js
index 6abb699ab815557f997f7b26d090b012df0cf809..0bf0fde9adbabe8349461ba1ba8e5737a73be667 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -616,23 +616,24 @@ WebInspector.DebuggerModel.prototype = {
* @param {boolean} doNotPauseOnExceptionsAndMuteConsole
* @param {boolean} returnByValue
* @param {boolean} generatePreview
- * @param {function(?WebInspector.RemoteObject, boolean, ?RuntimeAgent.RemoteObject=)} callback
+ * @param {function(?WebInspector.RemoteObject, boolean, ?RuntimeAgent.RemoteObject=, ?DebuggerAgent.ExceptionDetails=)} callback
*/
evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback)
{
/**
* @param {?RuntimeAgent.RemoteObject} result
* @param {boolean=} wasThrown
+ * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails
* @this {WebInspector.DebuggerModel}
*/
- function didEvaluate(result, wasThrown)
+ function didEvaluate(result, wasThrown, exceptionDetails)
{
if (!result)
callback(null, false);
else if (returnByValue)
- callback(null, !!wasThrown, wasThrown ? null : result);
+ callback(null, !!wasThrown, wasThrown ? null : result, exceptionDetails);
else
- callback(this.target().runtimeModel.createRemoteObject(result), !!wasThrown);
+ callback(this.target().runtimeModel.createRemoteObject(result), !!wasThrown, undefined, exceptionDetails);
if (objectGroup === "console")
this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame);
@@ -1053,7 +1054,7 @@ WebInspector.DebuggerModel.CallFrame.prototype = {
* @param {boolean} doNotPauseOnExceptionsAndMuteConsole
* @param {boolean} returnByValue
* @param {boolean} generatePreview
- * @param {function(?RuntimeAgent.RemoteObject, boolean=)=} callback
+ * @param {function(?RuntimeAgent.RemoteObject, boolean=, ?DebuggerAgent.ExceptionDetails=)} callback
*/
evaluate: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback)
{
@@ -1061,15 +1062,16 @@ WebInspector.DebuggerModel.CallFrame.prototype = {
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
* @param {boolean=} wasThrown
+ * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails
*/
- function didEvaluateOnCallFrame(error, result, wasThrown)
+ function didEvaluateOnCallFrame(error, result, wasThrown, exceptionDetails)
{
if (error) {
console.error(error);
callback(null, false);
return;
}
- callback(result, wasThrown);
+ callback(result, wasThrown, exceptionDetails);
}
this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEvaluateOnCallFrame);
},
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('k') | Source/devtools/front_end/sdk/RuntimeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698