WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
59000
Web Inspector: [protocol] Evaluate should expose thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=59000
Summary
Web Inspector: [protocol] Evaluate should expose thrown exception value
Peter Rybin
Reported
2011-04-20 09:15:19 PDT
In the protocol "evaluateOnCallFrame" command returns result value. However if expression throw exception, you only get string representation of exception (or get the process crashed if value is 'undefined'). The protocol should return value that has been thrown from expression. E.g. it may keep "result" property in result and add additional property "wasThrown".
Attachments
Patch
(42.48 KB, patch)
2011-04-28 10:16 PDT
,
Yury Semikhatsky
pfeldman
: review+
Details
Formatted Diff
Diff
Patch for landing
(44.73 KB, patch)
2011-04-29 05:26 PDT
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yury Semikhatsky
Comment 1
2011-04-28 10:16:00 PDT
Created
attachment 91511
[details]
Patch
Pavel Feldman
Comment 2
2011-04-28 10:26:47 PDT
Comment on
attachment 91511
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=91511&action=review
> LayoutTests/inspector/protocol/runtime-agent-expected.txt:26 > + wasThrown : false
Could you make this optional?
> Source/WebCore/inspector/InjectedScript.cpp:214 > + *errorString = "Internal error";
Could you add more details to this message?
> Source/WebCore/inspector/InjectedScript.cpp:223 > + *errorString = "Internal error";
ditto
> Source/WebCore/inspector/Inspector.json:214 > + { "name": "valueWasThrown", "type": "boolean", "optional": true, "description": "True if exception was thrown on attempt to get the property value, in that case the value propery will contain thrown value." },
wasThrown
> Source/WebCore/inspector/front-end/ConsoleView.js:363 > + if (!result || wasThrown)
is this check needed?
Build Bot
Comment 3
2011-04-28 10:56:54 PDT
Attachment 91511
[details]
did not build on win: Build output:
http://queues.webkit.org/results/8520423
Yury Semikhatsky
Comment 4
2011-04-29 05:26:01 PDT
Created
attachment 91668
[details]
Patch for landing All comments addressed.
Yury Semikhatsky
Comment 5
2011-04-29 05:37:49 PDT
Committed
r85319
: <
http://trac.webkit.org/changeset/85319
>
Peter Rybin
Comment 6
2011-05-12 16:20:09 PDT
Could you please consider refinement here: compilation failure and thrown exception should be reported differently. Compilation failure could be returned as exception (annotated for example as thrown="compile") or as rpc failure. I makes sense to display these problems differently.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug