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

vdoc: minor css fix + add error message

This commit is contained in:
Ned Palacios
2020-06-10 17:13:42 +08:00
committed by GitHub
parent e38a221dc3
commit e3c40f1df8
4 changed files with 24 additions and 10 deletions

View File

@ -573,7 +573,12 @@ fn (mut cfg DocConfig) generate_docs_from_file() {
for dirpath in dirs {
cfg.vprintln('Generating docs for ${dirpath}...')
mut dcs := doc.generate(dirpath, cfg.pub_only, true) or {
panic(err)
mut err_msg := err
if errcode == 1 {
err_msg += ' Use the `-m` flag if you are generating docs of a directory with multiple modules inside.'
}
eprintln(err_msg)
exit(1)
}
if dcs.contents.len == 0 { continue }
if cfg.is_multi {