-
Notifications
You must be signed in to change notification settings - Fork 53
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
Review the runtime errors currently generated by jBallerina #804
Comments
We have looked at http stdlib's recent changes to use But this design still does not capture the error message nor the detailed information. It can still lead to inconsistencies across the platforms. |
We need to split this problem up. The most important split is between errors and panics. There is a fundamental distinction in Ballerina between abnormal errors (which show up as panics) and normal errors (which show up as errors). Let's consider normal errors first. There are two cases:
For panics, I have made a new issue #807. |
@manuranga As a start, could you please categorize each entry in the catalog as an error or a panic? (Ideally, split into two sections.) I strongly suggest that code examples not use I would also recommend not using the |
I identified quite a number of cases in #807 (comment) for which there is no entry in the jBallerina catalog. These may well be jBallerina bugs. |
I would expect the specification only to specify the error type (i.e. distinct type and possibly error detail); I would not expect it to require specific error messages (I don't know of any language specification that does this). I would prioritize errors (i.e. #134, #689, #806) over panics (#807), because errors affect the types that users write (if they want to be more precise than just |
I updated the catalog with the categorization of normal errors and panics. And also removed the usage of |
Description:
Currently the langlib does not specify runtime errors that can occur. Errors are defined in the platform implementation code, and message format is not consistent. This can lead to the situation where the same program has different behaviors under different platforms.
As part of the solution we have started documenting the current runtime errors. https://docs.google.com/document/d/1qjQTIMjpedZTGTNVXRg3WggmmjcAS23SkY4yxn_teDQ/edit
How can we leverage ballerina error design to model this information in the langlib implementation, such that errors will stay consistent across the platforms?
The text was updated successfully, but these errors were encountered: