Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improved diagnostics for Parrot Object types sneaking into places tha…
…t need serialization.
  • Loading branch information
jnthn committed Feb 26, 2012
1 parent 600a772 commit 9acb660
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/6model/serialization.c
Expand Up @@ -448,6 +448,11 @@ void write_ref_func(PARROT_INTERP, SerializationWriter *writer, PMC *ref) {
discrim = REFVAR_CLONED_CODEREF;
}
}
else if (ref->vtable->base_type == enum_class_Object) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Serialization Error: Parrot object type '%Ss' passed to write_ref",
VTABLE_name(interp, VTABLE_get_class(interp, ref)));
}
else {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Serialization Error: Unimplemented object type '%Ss' passed to write_ref",
Expand Down

0 comments on commit 9acb660

Please sign in to comment.