-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Maryam Ziyad <maryamziyadm@gmail.com>
- Loading branch information
1 parent
7a8ecfa
commit 686a4ae
Showing
12 changed files
with
64 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
$ bal run check_expression.bal | ||
error("{ballerina/lang.int}NumberParsingError",message="'string' value 'hello' cannot be converted to 'int'") | ||
error("{ballerina/lang.int}NumberParsingError",message="'string' value 'hello' cannot be converted to 'int'") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
$ bal run error_reporting.bal | ||
message: failed to validate people | ||
details: {"people":[{"name":"Alice","age":25},{"name":"Bob","age":-1}]} | ||
stack trace: [callableName: validatePeople fileName: error_reporting.bal lineNumber: 18,callableName: main fileName: error_reporting.bal lineNumber: 35] | ||
cause: | ||
message: age cannot be negative | ||
details: {"person":{"name":"Bob","age":-1}} | ||
stack trace: [callableName: validatePerson fileName: error_reporting.bal lineNumber: 26,callableName: validatePeople fileName: error_reporting.bal lineNumber: 15,callableName: main fileName: error_reporting.bal lineNumber: 35] | ||
Validating Alice | ||
Validating Bob | ||
Message: Validation failed for a person | ||
Detail: {"person":{"name":"Bob","age":-1}} | ||
Stack trace: [callableName: validatePeople fileName: error_reporting.bal lineNumber: 20,callableName: main fileName: error_reporting.bal lineNumber: 40] | ||
Cause: | ||
Message: Age cannot be negative | ||
Detail: {"age":-1} | ||
Stack trace: [callableName: validatePerson fileName: error_reporting.bal lineNumber: 30,callableName: validatePeople fileName: error_reporting.bal lineNumber: 16,callableName: main fileName: error_reporting.bal lineNumber: 40] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
$ bal run trap_expression.bal | ||
Error: error("{ballerina}DivisionByZero",message=" / by zero") | ||
Error: error("deep down in the code") | ||
|
||
error: deep down in the code | ||
at trap_expression:alwaysPanic(trap_expression.bal:10) | ||
trap_expression:hereBeDragons(trap_expression.bal:5) | ||
trap_expression:main(trap_expression.bal:25) |