[svn:parrot] r47122 - trunk/src
jonathan at svn.parrot.org
jonathan at svn.parrot.org
Sun May 30 01:00:33 UTC 2010
Author: jonathan
Date: Sun May 30 01:00:33 2010
New Revision: 47122
URL: https://trac.parrot.org/parrot/changeset/47122
Log:
[core] Exceptions thrown from ops also need to stash the thrower inside the Exception object so we can produce the backtrace.
Modified:
trunk/src/exceptions.c
Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c Sun May 30 00:59:52 2010 (r47121)
+++ trunk/src/exceptions.c Sun May 30 01:00:33 2010 (r47122)
@@ -206,7 +206,13 @@
{
ASSERT_ARGS(Parrot_ex_throw_from_op)
opcode_t *address;
- PMC * const handler = Parrot_cx_find_handler_local(interp, exception);
+ PMC *handler;
+
+ /* Note the thrower. */
+ VTABLE_set_attr_str(interp, exception, CONST_STRING(interp, "thrower"), CURRENT_CONTEXT(interp));
+
+ /* Locate the handler, if there is one. */
+ handler = Parrot_cx_find_handler_local(interp, exception);
if (PMC_IS_NULL(handler)) {
STRING * const message = VTABLE_get_string(interp, exception);
const INTVAL severity = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
More information about the parrot-commits
mailing list