Skip to content

Error in data-binding converter logs unhelpful error message #5240

Open
@resnickj

Description

@resnickj

Please, provide the details below:

When an error is thrown from a data-binding converter object, the following message is logged:

Binding: Run-time error occured in file: undefined at line: undefined and column: undefined

This error message does not help to track down the source of the problem.

Which platform(s) does your issue occur on?

Android, not sure about iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.4.0
  • Cross-platform modules: 3.4.0

Please tell us how to recreate the issue in as much detail as possible.

https://play.nativescript.org/?template=play-js&id=FwUeEU

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Define converter like so:

appModule.getResources().dateConverter = function (time) {
  throw new Error("Oops, something went wrong.");
};

Use in XML like so:

<Label text="{{ currentTime, currentTime | dateConverter() }}" />

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions