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

Unified Diff: Source/devtools/front_end/sdk/RuntimeModel.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/DebuggerModel.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/RuntimeModel.js
diff --git a/Source/devtools/front_end/sdk/RuntimeModel.js b/Source/devtools/front_end/sdk/RuntimeModel.js
index 043a0131d80eec76e289b7ac250d518bccd6c623..c02c5989f0f102da15bc5d8004434cd1728332c3 100644
--- a/Source/devtools/front_end/sdk/RuntimeModel.js
+++ b/Source/devtools/front_end/sdk/RuntimeModel.js
@@ -203,7 +203,7 @@ WebInspector.ExecutionContext.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
*/
evaluate: function(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback)
{
@@ -223,8 +223,9 @@ WebInspector.ExecutionContext.prototype = {
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
* @param {boolean=} wasThrown
+ * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails
*/
- function evalCallback(error, result, wasThrown)
+ function evalCallback(error, result, wasThrown, exceptionDetails)
{
if (error) {
callback(null, false);
@@ -232,9 +233,9 @@ WebInspector.ExecutionContext.prototype = {
}
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);
}
this.target().runtimeAgent().evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, generatePreview, evalCallback.bind(this));
},
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerModel.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698