From 790df95072dbd2cd2ea10b090eec983b81f3835b Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Thu, 8 Nov 2012 17:37:55 +0100 Subject: [PATCH] Updates docs about exceptions being on the stack/heap. --- doc/tut2.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/tut2.txt b/doc/tut2.txt index f34e97318..9c55b0e35 100755 --- a/doc/tut2.txt +++ b/doc/tut2.txt @@ -361,7 +361,8 @@ prefixed with an 'E', not 'T'. The `system `_ module defines an exception hierarchy that you might want to stick to. Exceptions derive from E_Base, which provides the common interface. -Exceptions should be allocated on the heap because their lifetime is unknown. +Exceptions have to be allocated on the heap because their lifetime is unknown. +The compiler will prevent you from raising an exception created on the stack. All raised exceptions should at least specify the reason for being raised in the ``msg`` field.