summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-03 09:22:19 +0200
committerAraq <rumpf_a@web.de>2018-09-03 09:22:19 +0200
commit7ace82440fe230ee6959971ff1aaaccdad85d21d (patch)
tree65d3b3f574e0d2bd0de747536a104855418d90a9 /lib
parent077f24ab2dd2564799272b3cb673e17b33596b4f (diff)
downloadNim-7ace82440fe230ee6959971ff1aaaccdad85d21d.tar.gz
deprecate system.onRaise; fixes #1652
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index bfd8a31e5..973a09e99 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -3386,12 +3386,15 @@ when not defined(JS): #and not defined(nimscript):
       var e = getCurrentException()
       return if e == nil: "" else: e.msg
 
-    proc onRaise*(action: proc(e: ref Exception): bool{.closure.}) =
+    proc onRaise*(action: proc(e: ref Exception): bool{.closure.}) {.deprecated.} =
       ## can be used in a ``try`` statement to setup a Lisp-like
       ## `condition system`:idx:\: This prevents the 'raise' statement to
       ## raise an exception but instead calls ``action``.
       ## If ``action`` returns false, the exception has been handled and
       ## does not propagate further through the call stack.
+      ##
+      ## *Deprecated since version 0.18.1*: No good usages of this
+      ## feature are known.
       if not isNil(excHandler):
         excHandler.hasRaiseAction = true
         excHandler.raiseAction = action