Closed
Bug 1460229
Opened 7 years ago
Closed 7 years ago
Protocol.js doesn't throw an explicit error when a method is specified in spec but not implement in the actor
Categories
(DevTools :: Framework, enhancement, P3)
DevTools
Framework
Tracking
(firefox62 fixed)
RESOLVED
FIXED
Firefox 62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission)
Attachments
(1 file)
I saw that while working in bug 1449162. It would be great to replace the cryptic exception happening within protocol.js by an explicit error message.
Assignee | ||
Updated•7 years ago
|
Severity: normal → enhancement
Priority: -- → P3
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → poirot.alex
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
No impact on perf:
https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&originalRevision=6ca283f776f569d6f5e4a1805d8154e87f55f3af&newProject=try&newRevision=587d229b7062ed75bd70dffe2aa71095ce838952&originalSignature=f79b6a4f1f8f53326d3056f6c8008c0ff4de0a94&newSignature=f79b6a4f1f8f53326d3056f6c8008c0ff4de0a94&framework=1
Green try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=587d229b7062ed75bd70dffe2aa71095ce838952
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8974317 [details]
Bug 1460229 - Throw an explicit error message when a method specified in a spec is missing in the actor.
https://reviewboard.mozilla.org/r/242634/#review250088
Great, this seems like a helpful improvement! :)
::: devtools/shared/protocol.js:1155
(Diff revision 1)
> console.error("Error reading request: " + packet.type);
> throw ex;
> }
>
> + if (!this[spec.name]) {
> + throw new Error(`Spec for '${actorProto.typeName}' specify a '${spec.name}' ` +
Nit: specify -> specifies
Attachment #8974317 -
Flags: review?(jryans) → review+
Comment hidden (mozreview-request) |
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac313bdb1bff
Throw an explicit error message when a method specified in a spec is missing in the actor. r=jryans
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Updated•6 years ago
|
Product: Firefox → DevTools
Assignee | ||
Updated•6 years ago
|
Whiteboard: dt-fission
You need to log in
before you can comment on or make changes to this bug.
Description
•