Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfriendly error message from List constructor #15986

Closed
peter-ahe-google opened this issue Jan 9, 2014 · 3 comments
Closed

Unfriendly error message from List constructor #15986

peter-ahe-google opened this issue Jan 9, 2014 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug

Comments

@peter-ahe-google
Copy link
Contributor

I'm seeing this exception:

Illegal argument(s): Length must be an integer in the range [0..268435455].

­0 List.List (dart:core-patch/array_patch.dart:20)

­1 MirrorUsageBuilder.convertConstantToUsageList (file:///Users/ahe/Dart/all/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart:428)

­2 MirrorUsageAnalyzerTask.validate (file:///Users/ahe/Dart/all/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart:150)

I'm not told what the offending value is. Is it null? A string? A negative number?

@peter-ahe-google
Copy link
Contributor Author

FWIW, this is the error message I got in checked mode:

type 'MappedListIterable' is not a subtype of type 'int' of 'length'.

That's much better, but I still think the other message could benefit from using Error.safeToString to print the length value.

@lrhn
Copy link
Member

lrhn commented May 5, 2014

This error is thrown from C code (List_allocate in array.cc).


Removed Type-Defect, Area-Library labels.
Added Type-Enhancement, Area-VM labels.

@peter-ahe-google peter-ahe-google added Type-Enhancement area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels May 5, 2014
@lrhn lrhn self-assigned this Aug 17, 2015
@lrhn
Copy link
Member

lrhn commented Aug 17, 2015

Better error messages have been added.

@lrhn lrhn closed this as completed Aug 17, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants