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

checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01)

This commit is contained in:
Delyan Angelov
2022-04-12 13:38:40 +03:00
parent 4c7cdd2a2d
commit 8788512c4d
28 changed files with 107 additions and 100 deletions

View File

@@ -30,7 +30,7 @@ fn main() {
// The user just wants an independent copy of v, and so we are done.
return
}
backup_old_version_and_rename_newer(short_v_name) or { panic(err.msg) }
backup_old_version_and_rename_newer(short_v_name) or { panic(err.msg()) }
println('V built successfully as executable "$vexe_name".')
}
@@ -71,17 +71,17 @@ fn backup_old_version_and_rename_newer(short_v_name string) ?bool {
list_folder(short_v_name, 'before:', 'removing $bak_file ...')
if os.exists(bak_file) {
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg' }
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg()' }
}
list_folder(short_v_name, '', 'moving $v_file to $bak_file ...')
os.mv(v_file, bak_file) or { errors << err.msg }
os.mv(v_file, bak_file) or { errors << err.msg() }
list_folder(short_v_name, '', 'removing $v_file ...')
os.rm(v_file) or {}
list_folder(short_v_name, '', 'moving $v2_file to $v_file ...')
os.mv_by_cp(v2_file, v_file) or { panic(err.msg) }
os.mv_by_cp(v2_file, v_file) or { panic(err.msg()) }
list_folder(short_v_name, 'after:', '')