Skip to content

Unclear error message for function getting wrong arguments #2156

Closed
@DartBot

Description

@DartBot

This issue was originally filed by lod...@google.com


Hello,

I tried out code like this, where "view.on.click" takes a function responding to mouse click events:

view.on.click = function() {
  print('clicked');
};

The above is wrong, it has to be, for example:

view.on.click = function(var event) {
  print('clicked');
};

Dartium gives the following error message:

Exception: Closure argument mismatch

It would be nice if it would say something more helpful, like "Wrong function signature, one argument of type ..... required".

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.closed-obsoleteClosed as the reported issue is no longer relevant

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions