Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Node bindings - Remove usage of JS.Error and friends #58

Open
jgrund opened this issue Feb 9, 2018 · 2 comments
Open

Node bindings - Remove usage of JS.Error and friends #58

jgrund opened this issue Feb 9, 2018 · 2 comments
Labels

Comments

@jgrund
Copy link
Member

jgrund commented Feb 9, 2018

Since F# has System.Exception, I'm wondering if we should just use that (and extend it where necessary) in the node bindings.

@jgrund jgrund added the question label Feb 9, 2018
@MangelMaxime
Copy link
Member

This can make sense if we have custom Exception when possible (with custom fields, etc.) to make it easier to access the Error/Exception info.

Otherwise not sure to see the difference between JS.Error and Exception.
Would this cause some problems/conflicts in the error definition for third parties libs ?

@alfonsogarciacaro
Copy link
Member

Fable translates .NET System.Exception to JS Error and makes equivalence between the Message and StackTrace property (reference). So the proposal makes sense :)

When you define a custom exception it will extend JS Error in generated code, but I'm not sure right now how that would work in the bindings, haven't tried yet 🤔

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants