catch exceptions in `appInvocation` (#78)
The `appInvocation` template in `confutils` is used while showing help, e.g., before quitting. To ensure that `quit` actually happens, it can't raise exceptions. Fix that by falling back to `""` on `OSError`.
This commit is contained in:
parent
50f744d821
commit
6c3566850d
|
@ -96,7 +96,10 @@ when defined(nimscript):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
template appInvocation: string =
|
template appInvocation: string =
|
||||||
getAppFilename().splitFile.name
|
try:
|
||||||
|
getAppFilename().splitFile.name
|
||||||
|
except OSError:
|
||||||
|
""
|
||||||
|
|
||||||
when noColors:
|
when noColors:
|
||||||
const
|
const
|
||||||
|
|
Loading…
Reference in New Issue