Repository navigation
Commit 89f7b2a
committed
Web Inspector: improve error message when code generator is unable to parse JSON
https://bugs.webkit.org/show_bug.cgi?id=289613
Reviewed by Devin Rousso.
Having the error context readily available makes it much easier to edit protocol JSON files.
* Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification.load_specification): Save the filename so it can be used later in
the topmost exception handler to create a nice error message. Print the error message to stderr
so that failure results can be correctly interpreted by `run-inspector-generator-tests --reset-results`.
* Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-invalid-json-with-context.json-error: Added.
* Source/JavaScriptCore/inspector/scripts/tests/fail-on-invalid-json-with-context.json: Added.
* Tools/Scripts/webkitpy/style/checker.py:
Skip checking of JSON syntax in the Inspector code generator tests directory. We intentionally
use some invalid JSON inputs starting with this change.
Canonical link: https://commits.webkit.org/292123@main1 parent 8e00808 commit 89f7b2a
4 files changed
Lines changed: 44 additions & 2 deletions
File tree
- Source/JavaScriptCore/inspector/scripts
- tests
- expected
- Tools/Scripts/webkitpy/style
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
131 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
307 | 322 | | |
308 | 323 | | |
309 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
0 commit comments