Show better error when standard library cannot be found.
This commit is contained in:
parent
c8cd1d9286
commit
182893c529
2 changed files with 21 additions and 3 deletions
|
|
@ -329,12 +329,14 @@ proc readPackageInfo(nf: NimbleFile, options: Options,
|
|||
try:
|
||||
readPackageInfoFromNims(nf, options, result)
|
||||
result.isNimScript = true
|
||||
except NimbleError:
|
||||
except NimbleError as exc:
|
||||
if exc.hint.len > 0:
|
||||
raise
|
||||
let msg = "Could not read package info file in " & nf & ";\n" &
|
||||
" Reading as ini file failed with: \n" &
|
||||
" " & iniError.msg & ".\n" &
|
||||
" Evaluating as NimScript file failed with: \n" &
|
||||
" " & getCurrentExceptionMsg() & "."
|
||||
" " & exc.msg & "."
|
||||
raise newException(NimbleError, msg)
|
||||
|
||||
# By default specialVersion is the same as version.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue