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

@@ -244,8 +244,8 @@ fn (vd VDoc) get_readme(path string) string {
fn (vd VDoc) emit_generate_err(err IError) {
cfg := vd.cfg
mut err_msg := err.msg
if err.code == 1 {
mut err_msg := err.msg()
if err.code() == 1 {
mod_list := get_modules_list(cfg.input_path, []string{})
println('Available modules:\n==================')
for mod in mod_list {
@@ -467,7 +467,7 @@ fn parse_arguments(args []string) Config {
exit(1)
}
selected_platform := doc.platform_from_string(platform_str) or {
eprintln(err.msg)
eprintln(err.msg())
exit(1)
}
cfg.platform = selected_platform