summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorManav <garg.manav8@gmail.com>2020-02-20 19:46:19 +0530
committerGitHub <noreply@github.com>2020-02-20 15:16:19 +0100
commit479f4ca6a3d02a85eb26243403ada518b341f430 (patch)
tree22ac284ba799606ebf922cd0ed30f401038eddb0
parent87dd19453b9a9aeded5f85714e90e12fc8bab0bf (diff)
downloadNim-479f4ca6a3d02a85eb26243403ada518b341f430.tar.gz
Fixed non-working examples in Manual: Exception Handling (#13424)
-rw-r--r--doc/manual.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/manual.rst b/doc/manual.rst
index b31458fc4..ba13f2f02 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -4106,6 +4106,8 @@ needs to fit the types of ``except`` branches, but the type of the ``finally``
 branch always has to be ``void``:
 
 .. code-block:: nim
+  from strutils import parseInt
+  
   let x = try: parseInt("133a")
           except: -1
           finally: echo "hi"
@@ -4220,7 +4222,7 @@ Raise statement
 Example:
 
 .. code-block:: nim
-  raise newEOS("operating system failed")
+  raise newException(IOError, "IO failed")
 
 Apart from built-in operations like array indexing, memory allocation, etc.
 the ``raise`` statement is the only way to raise an exception.