On Oct 1, 2007, at 12:45 PM, jerry gay wrote:

On 10/1/07, Paul Cochrane via RT
<[EMAIL PROTECTED]> wrote:
src/exceptions.c has a todo comment in it:

 * XXX TODO get rid of all the internal_exceptions or call them
 *          with an interpreter arg

The fact that we can't completely get rid of internal_exception() has
already been discussed (in some instances it's not appropriate to
replace with real_exception()).  However, should internal_exception()
take an interpreter arg?

from my understanding, internal_exception()s occur when something has
gone horribly wrong, like when you don't have a valid interpreter
anymore.

upon further investigation, it seems this comment is *inside* the
internal_exception function definition. that suggests to me that
perhaps there's some merit to the idea. however, i can't imagine why,
so i'm interested in ideas and/or recollections from others.

~jerry


I think it's more of a case of "when" to use internal exceptions. Some things should be internal exceptions just because otherwise either the program would not run properly(and the interpreter is not yet started). But if the problem can be generated from PIR, it should probably be a real_exception. If it can't, it might be an internal_exception. It seems to me that the comment exists because it doesn't allow a program to "properly clean up after itself." It's not good, but most operating systems probably take care of all issues that would be involved(sending broken pipes, closing file handles, freeing memory, etc).

Reply via email to