summary refs log tree commit diff stats
path: root/web
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2017-02-01 21:11:40 +0100
committerDominik Picheta <dominikpicheta@gmail.com>2017-02-01 21:11:40 +0100
commit3cbfd56e1d02f30124a15db6104ac5d7ffbbbea3 (patch)
treecd7311f068784571014b36e66f47ff7656a6debe /web
parente8c46d29cdfa604bf13294bc3505938fc243754d (diff)
downloadNim-3cbfd56e1d02f30124a15db6104ac5d7ffbbbea3.tar.gz
Fixes #3691.
Diffstat (limited to 'web')
-rw-r--r--web/news/e031_version_0_16_2.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/news/e031_version_0_16_2.rst b/web/news/e031_version_0_16_2.rst
index 4d9d99d16..225324c3a 100644
--- a/web/news/e031_version_0_16_2.rst
+++ b/web/news/e031_version_0_16_2.rst
@@ -25,3 +25,19 @@ Compiler Additions
 Language Additions
 ------------------
 
+- The ``try`` statement's ``except`` branches now support the binding of a
+caught exception to a variable:
+
+.. code-block:: nim
+  try:
+    raise newException(Exception, "Hello World")
+  except Exception as exc:
+    echo(exc.msg)
+
+This replaces the ``getCurrentException`` and ``getCurrentExceptionMsg()``
+procedures, although these procedures will remain in the stdlib for the
+foreseeable future. This new language feature is actually implemented using
+these procedures.
+
+In the near future we will be converting all exception types to refs to
+remove the need for the ``newException`` template.