mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: change IError msg and code to methods + fix vlib, add a deprecation notice for the old usages (#13041)
This commit is contained in:
@@ -22,13 +22,11 @@ mut:
|
||||
}
|
||||
|
||||
struct InvalidTokenError {
|
||||
msg string
|
||||
code int
|
||||
MessageError
|
||||
}
|
||||
|
||||
struct UnknownTokenError {
|
||||
msg string
|
||||
code int
|
||||
MessageError
|
||||
}
|
||||
|
||||
fn (mut p Parser) next() {
|
||||
|
||||
@@ -43,7 +43,7 @@ fn test_raw_decode_null() ? {
|
||||
|
||||
fn test_raw_decode_invalid() ? {
|
||||
raw_decode('1z') or {
|
||||
assert err.msg == '[x.json2] invalid token `z` (0:17)'
|
||||
assert err.msg() == '[x.json2] invalid token `z` (0:17)'
|
||||
return
|
||||
}
|
||||
assert false
|
||||
|
||||
Reference in New Issue
Block a user