diff options
author | Araq <rumpf_a@web.de> | 2018-06-26 01:35:12 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-06-26 01:35:12 +0200 |
commit | c68d52b69d479679914aa56fc7b85b25d2baba8b (patch) | |
tree | 34f3099b3bd3fa09a7d6b762b77582a862acac3d /compiler/commands.nim | |
parent | aef441101fcfd8390f9a28777ae2bef8b1c5b5b2 (diff) | |
parent | 27b081d1f77604ee47c886e69dbc52f53ea3741f (diff) | |
download | Nim-c68d52b69d479679914aa56fc7b85b25d2baba8b.tar.gz |
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 330504a76..866405f9f 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -606,7 +606,10 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; incl(conf.globalOptions, optRun) of "verbosity": expectArg(conf, switch, arg, pass, info) - conf.verbosity = parseInt(arg) + let verbosity = parseInt(arg) + if verbosity notin {0..3}: + localError(conf, info, "invalid verbosity level: '$1'" % arg) + conf.verbosity = verbosity conf.notes = NotesVerbosity[conf.verbosity] incl(conf.notes, conf.enableNotes) excl(conf.notes, conf.disableNotes) |