Design of Error Type #183
Replies: 7 comments 4 replies
-
|
@ayonam - Please give your suggestions on designing error type. |
Beta Was this translation helpful? Give feedback.
-
|
To add support for -
|
Beta Was this translation helpful? Give feedback.
-
|
Note - The error type has two components: Detail is basically record which consist more details about the error. We are not supporting record type at the moment, right? Reference - https://medium.com/ballerina-techblog/ballerina-error-handling-part-i-d581f65c0f8d |
Beta Was this translation helpful? Give feedback.
-
|
@ayonam and I had a quick discussion about designing error type -
|
Beta Was this translation helpful? Give feedback.
-
|
A rust function needs to be generated as below -
param1 - "actual error string" - message operand |
Beta Was this translation helpful? Give feedback.
-
|
In the instructions obtained from the BIR, I am getting a new instruction called - Is this instruction similar to |
Beta Was this translation helpful? Give feedback.
-
Design of Error TypeOverviewModel error type object in the Rust runtime and use an opaque pointer in the LLVM codegen side to hold it as its value. Data model - C++/BIR representationExtend Codegen logicInit logic
Data model - Runtime (Rust)
BIR parser updates
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Error type needs to be handled in below cases -
For the below testcase,
Information available from the BIR is as follows -
A new error instruction consisting of -
References - https://ballerina.io/learn/by-example/error-handling.html
https://ballerina.io/spec/lang/2020R1/#error-type-params
Beta Was this translation helpful? Give feedback.
All reactions