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

Issue 24395007: Improve NoSuchMethodError error messages (Closed)

Created:
7 years, 3 months ago by hausner
Modified:
7 years, 2 months ago
Reviewers:
regis
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Improve NoSuchMethodError error messages - Don't say there is no constructor with name X if there is one that has incompatible parameter list. - Better error message when mismatched optional parameters are passed. (Prviously only the number of parameters was considered, but not names of named parameters for example.) Fixes issue 6189. R=regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=27826

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -69 lines) Patch
M runtime/lib/errors_patch.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 3 chunks +62 lines, -39 lines 0 comments Download
M runtime/vm/parser.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/parser.cc View 1 15 chunks +59 lines, -28 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
hausner
7 years, 3 months ago (2013-09-23 23:23:14 UTC) #1
regis
LGTM https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h File runtime/vm/object.h (right): https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h#newcode1421 runtime/vm/object.h:1421: RawString* UserVisibleParameterSignature() const; How about UserVisibleFormalParameters? https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h#newcode1870 runtime/vm/object.h:1870: ...
7 years, 3 months ago (2013-09-24 01:10:23 UTC) #2
hausner
Committed patchset #2 manually as r27826 (presubmit successful).
7 years, 2 months ago (2013-09-24 16:15:23 UTC) #3
hausner
Thank you. https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h File runtime/vm/object.h (right): https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h#newcode1421 runtime/vm/object.h:1421: RawString* UserVisibleParameterSignature() const; On 2013/09/24 01:10:24, regis ...
7 years, 2 months ago (2013-09-24 16:17:09 UTC) #4
regis
7 years, 2 months ago (2013-09-24 16:22:35 UTC) #5
Message was sent while issue was closed.
On 2013/09/24 16:17:09, hausner wrote:
> Thank you.
> 
> https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h
> File runtime/vm/object.h (right):
> 
>
https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h#newcode1421
> runtime/vm/object.h:1421: RawString* UserVisibleParameterSignature() const;
> On 2013/09/24 01:10:24, regis wrote:
> > How about UserVisibleFormalParameters?
> 
> Much better. Done.
> 
>
https://codereview.chromium.org/24395007/diff/1/runtime/vm/object.h#newcode1870
> runtime/vm/object.h:1870: void ParameterSignatureHelper(
> On 2013/09/24 01:10:24, regis wrote:
> > The term ParameterSignature could mean other things.
> > How about BuildFormalParameters?
> 
> How about BuildSinatureParameters (the parameter portion of BuildSignature)?
> 
Great, But with a g in sinature would be even better.


> https://codereview.chromium.org/24395007/diff/1/runtime/vm/parser.cc
> File runtime/vm/parser.cc (right):
> 
>
https://codereview.chromium.org/24395007/diff/1/runtime/vm/parser.cc#newcode7671
> runtime/vm/parser.cc:7671: NULL);
> On 2013/09/24 01:10:24, regis wrote:
> > As we add a comment for the 4th null argument, you could add:
> > // No existing function.
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698