use .. warning:: (#17226)
* remove unnecessary when statement * remove outdated codes * use warnings
This commit is contained in:
parent
c180de60a8
commit
5670b848cb
5 changed files with 13 additions and 16 deletions
|
|
@ -1939,8 +1939,7 @@ when notJSnotNims:
|
|||
## With this hook you can influence exception handling on a global level.
|
||||
## If not nil, every 'raise' statement ends up calling this hook.
|
||||
##
|
||||
## **Warning**: Ordinary application code should never set this hook!
|
||||
## You better know what you do when setting this.
|
||||
## .. warning:: Ordinary application code should never set this hook! You better know what you do when setting this.
|
||||
##
|
||||
## If `globalRaiseHook` returns false, the exception is caught and does
|
||||
## not propagate further through the call stack.
|
||||
|
|
@ -1950,8 +1949,7 @@ when notJSnotNims:
|
|||
## thread local level.
|
||||
## If not nil, every 'raise' statement ends up calling this hook.
|
||||
##
|
||||
## **Warning**: Ordinary application code should never set this hook!
|
||||
## You better know what you do when setting this.
|
||||
## .. warning:: Ordinary application code should never set this hook! You better know what you do when setting this.
|
||||
##
|
||||
## If `localRaiseHook` returns false, the exception
|
||||
## is caught and does not propagate further through the call stack.
|
||||
|
|
@ -2408,7 +2406,7 @@ when notJSnotNims and hostOS != "standalone":
|
|||
proc setCurrentException*(exc: ref Exception) {.inline, benign.} =
|
||||
## Sets the current exception.
|
||||
##
|
||||
## **Warning**: Only use this if you know what you are doing.
|
||||
## .. warning:: Only use this if you know what you are doing.
|
||||
currException = exc
|
||||
elif defined(nimscript):
|
||||
proc getCurrentException*(): ref Exception {.compilerRtl.} = discard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue