1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: show non zero codes on bubbled error_with_code(msg,code) errors

This commit is contained in:
Delyan Angelov
2022-08-16 18:21:28 +03:00
parent 66a3cdec6a
commit 18cccb6caf
4 changed files with 33 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ fn test_signal_opt_invalid_argument() {
assert false
}
os.signal_opt(.kill, default_handler) or {
assert err.msg() == 'Invalid argument'
assert err.msg() == 'Invalid argument; code: 22'
assert err.code() == 22
}
}