POV-Ray : Newsgroups : povray.programming : UNIX POVRay does not exit with failure on error : Re: UNIX POVRay does not exit with failure on error Server Time
2 Jul 2024 09:42:04 EDT (-0400)
  Re: UNIX POVRay does not exit with failure on error  
From: Thorsten Froehlich
Date: 12 Aug 2004 14:38:17
Message: <411bb919@news.povray.org>
In article <411a9cf3@news.povray.org> , Wolfgang Wieser 
<wwi### [at] nospamgmxde>  wrote:

>> Not a good idea.  While it may work, the problem is the side effect of an
>> exception - it calls all the appropriate destructors.  However, as POV-Ray
>> cleans up itself, this is not exactly desired...
>>
> Hmm... I don't completely understand that.
> (1) the objects destroyed by the exception are all allocated on the stack.
>    How could that harm?

Because those objects might be used elsewhere in unexpected ways that might
not even be completely legal.  Note that I do not say this is the case, just
that it is a can of worms that should be left closed.

> (2) There are quite a lot of "throw (int)" in the code and I don't see the
>    difference (without having had a look at the scattered catch constructs).

You are confusing the frontend code with the core code.  I would recommend
to look at one of the two threaded implementations of frontend and core - in
the Windows or Mac OS sources.  The separation of work is better to
understand there (I would recommend the Mac implementation because it was
entirely written for this while the Windows version is modified 3.5 code).

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.