Skip to content

How to write bindings for errors in Fable 3?  #2492

@MangelMaxime

Description

@MangelMaxime

Description

This issue a is a follow up from this discussion: fable-compiler/ts2fable#351 (comment)

I am encountering a problem while working with bindings that contains Errors in JavaScript. In Fable 3 (or was it Fable 2?), a decision has been made to use System.Exception to represents JavaScript errors but this seems to cause a problem when working on bindings.

It seems like we can't inherit from System.Exception without adding AsbtractClass but adding this attributes makes Fable generates an invalid code in the case of the binding.

@alfonsogarciacaro What is the correct solution for writing bindings for a JavaScript error ?

REPL

Related information

  • Fable version: 3.2.9
  • Operating system: Windows / REPL

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