Bug 8136 – Stack unwinding example uses OutOfMemoryError

Status
NEW
Severity
normal
Priority
P3
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-23T12:39:30Z
Last change time
2024-12-15T15:21:56Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dlang.org#4018 →

Comments

Comment #0 by code — 2012-05-23T12:39:30Z
If code detects an error like "out of memory," then an Error is thrown with a message saying "Out of memory". The function call stack is unwound, looking for a handler for the Error. Finally blocks are executed as the stack is unwound. If an error handler is found, execution resumes there. If not, the default Error handler is run, which displays the message and terminates the program. This paragraph from http://dlang.org/errors.html exemplifies stack unwinding and cleanup. It should be changed to use an Exception. http://d.puremagic.com/issues/show_bug.cgi?id=8135
Comment #1 by code — 2012-05-23T12:46:57Z
The page (http://dlang.org/errors.html) should explain the difference between both kinds of Throwables, i.e. recoverable Exceptions and unrecoverable Errors.
Comment #2 by robert.schadek — 2024-12-15T15:21:56Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/4018 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB