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

Define some standard error types for use by lang.* modules #134

Open
jclark opened this issue May 19, 2019 · 5 comments
Open

Define some standard error types for use by lang.* modules #134

jclark opened this issue May 19, 2019 · 5 comments
Assignees
Labels
design/incomplete Part of design not yet worked out langlib Relates to lang.* libraries
Milestone

Comments

@jclark
Copy link
Collaborator

jclark commented May 19, 2019

At the moment, lang.* modules than return errors just return error, but they should return a specific type of error with specific details.

This could be pushed to later

@jclark jclark added design/incomplete Part of design not yet worked out langlib Relates to lang.* libraries labels May 19, 2019
@jclark jclark added this to the 2019R2 milestone May 19, 2019
@jclark jclark self-assigned this Jun 4, 2019
@jclark
Copy link
Collaborator Author

jclark commented Jun 18, 2019

This depends on #227.

@jclark jclark modified the milestones: 2019R2, 2019R4 Jun 20, 2019
@jclark jclark modified the milestones: 2019R5, 2020R1 Dec 21, 2019
@jclark jclark modified the milestones: 2020R1, 2020R2 Jan 23, 2020
@jclark jclark modified the milestones: 2020R2, 2020R3 Mar 25, 2020
@jclark
Copy link
Collaborator Author

jclark commented May 1, 2020

With distinct error types from #413, we are now ready to do this.

@jclark
Copy link
Collaborator Author

jclark commented May 1, 2020

We should also define types for errors generated by language panics.

@jclark
Copy link
Collaborator Author

jclark commented Apr 8, 2021

We can categorize the langlib functions that return errors as follows:

  • Functions like int:fromString. These start with from and each function creates a specific type of value from a specific type of input. This covers most cases.
  • Functions that construct a value belonging to a type specified by a typedesc argument. These are all in lang.value: cloneWithType, fromJsonWithType, fromJsonStringWithType
  • value:mergeJson
  • value:ensureType (this is also generated by check expressions in some cases and so relates to Need distinct error type for language errors from json and lax typing #806)

@jclark
Copy link
Collaborator Author

jclark commented Apr 8, 2021

We are handling panics in #807.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design/incomplete Part of design not yet worked out langlib Relates to lang.* libraries
Projects
None yet
Development

No branches or pull requests

1 participant