Catch exceptions in VTABLE find_method #25

Merged
merged 2 commits into from Jan 2, 2012

Conversation

Projects
None yet
1 participant
@KrisShannon
Contributor

KrisShannon commented Jan 1, 2012

I need this to get 'nqp --target=past -e 1' working again.

@KrisShannon

This comment has been minimized.

Show comment
Hide comment
@KrisShannon

KrisShannon Jan 1, 2012

Contributor

This came from dukeleto++ wanting to find the real cause I was just patching over in parrot/parrot#239

Contributor

KrisShannon commented Jan 1, 2012

This came from dukeleto++ wanting to find the real cause I was just patching over in parrot/parrot#239

Catch exceptions in VTABLE find_method
The sixmodel VTABLE find_method calls the find_method
in the containers STABLE which will throw instead of
returning NULL if it can't find the method.

Anything which is calling the VTABLE find_method is not
going to be expecting an exception so catch any exception
and return NULL.
@KrisShannon

This comment has been minimized.

Show comment
Hide comment
@KrisShannon

KrisShannon Jan 1, 2012

Contributor

UPDATED:

Dropped the new VTABLE can,
and moved the exception catching into VTABLE find_method

sorear++ pointed out that exceptions shouldn't be being thrown
from VTABLE find_method at all.

Contributor

KrisShannon commented Jan 1, 2012

UPDATED:

Dropped the new VTABLE can,
and moved the exception catching into VTABLE find_method

sorear++ pointed out that exceptions shouldn't be being thrown
from VTABLE find_method at all.

@KrisShannon

This comment has been minimized.

Show comment
Hide comment
@KrisShannon

KrisShannon Jan 2, 2012

Contributor

Hmm, it looks like this isn't good enough as an exception handler. I'm geting segfault's when I've intercepted an exception
and returned NULL to another C routine which sees the NULL and throw's it's own exception.

Contributor

KrisShannon commented Jan 2, 2012

Hmm, it looks like this isn't good enough as an exception handler. I'm geting segfault's when I've intercepted an exception
and returned NULL to another C routine which sees the NULL and throw's it's own exception.

@KrisShannon KrisShannon merged commit b9c26af into perl6:master Jan 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment