RESOLVED FIXED 42873
Web Inspector: error info propagation in InspectorBackendDispatch should be improved
https://bugs.webkit.org/show_bug.cgi?id=42873
Summary Web Inspector: error info propagation in InspectorBackendDispatch should be i...
Ilya Tikhonovsky
Reported 2010-07-23 00:00:20 PDT
it would be better to push a detailed error description back to the caller if some argument required by function spec is missed or has incorrect type.
Attachments
Patch (4.61 KB, patch)
2010-07-23 02:23 PDT, Yury Semikhatsky
pfeldman: review+
InspectorBackendDispatcher.cpp (56.75 KB, application/octet-stream)
2010-07-23 02:39 PDT, Yury Semikhatsky
no flags
Yury Semikhatsky
Comment 1 2010-07-23 02:23:03 PDT
Ilya Tikhonovsky
Comment 2 2010-07-23 02:36:38 PDT
Comment on attachment 62398 [details] Patch WebCore/inspector/CodeGeneratorInspector.pm:245 + push(@function, " if (args->length() != " . $expectedParametersCount . ") {"); can be simplified a bit. push(@function, " if (args->length() != $expectedParametersCount) {"); WebCore/inspector/CodeGeneratorInspector.pm:246 + push(@function, " *exception = String::format(\"Wrong number of parameters: %d (expected: $expectedParametersCount)\", args->length());"); It would be better to also print the parameter name.
Yury Semikhatsky
Comment 3 2010-07-23 02:39:45 PDT
Created attachment 62399 [details] InspectorBackendDispatcher.cpp
Yury Semikhatsky
Comment 4 2010-07-23 04:59:08 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/CodeGeneratorInspector.pm Committed r63962
Yury Semikhatsky
Comment 5 2010-07-23 04:59:28 PDT
(In reply to comment #2) > (From update of attachment 62398 [details]) > > WebCore/inspector/CodeGeneratorInspector.pm:245 > + push(@function, " if (args->length() != " . $expectedParametersCount . ") {"); > > can be simplified a bit. > push(@function, " if (args->length() != $expectedParametersCount) {"); > > > WebCore/inspector/CodeGeneratorInspector.pm:246 > + push(@function, " *exception = String::format(\"Wrong number of parameters: %d (expected: $expectedParametersCount)\", args->length());"); > It would be better to also print the parameter name. All comments have been addressed.
Note You need to log in before you can comment on or make changes to this bug.