[Suggestion] Change error message: Failed expression must be followed by a block or statement
When running a function that requires a failed block (like function parse) but not using failed, an error is raised:
[user@pc test]$ amber program1.ab
[src/modules/condition/failed.rs:64:21] "FAILED" = "FAILED"
ERROR
Failed expression must be followed by a block or statement
at program1.ab:6:1
I have one suggestion. When the code is using a failing function without failed, the error message could be clearer, like below:
[user@pc test]$ amber program1.ab
ERROR
The function 'parse' requires a 'failed' block or statement to handle errors
at program1.ab:6:1
The line that gets produced in the error:
[src/modules/condition/failed.rs:64:21] "FAILED" = "FAILED"
Is removed once this PR gets merged https://github.com/Ph0enixKM/Amber/pull/203
This ticket can be closed as the PR was merged?
@Mte90 Which PR closes this issue?
#203 as you wrote
This only partially closes this issue - we need to change the error message too