Author: leo
Date: Wed Nov 16 12:01:56 2005
New Revision: 10032
Modified:
trunk/src/objects.c
Log:
throw real_exception if newclass fails due to already registered class
Modified: trunk/src/objects.c
==============================================================================
--- trunk/src/objects.c (original)
+++ trunk/src/objects.c Wed Nov 16 12:01:56 2005
@@ -454,9 +454,8 @@ parrot_class_register(Interp* interprete
* register the class in the PMCs name class_hash
*/
if ((new_type = pmc_type(interpreter, class_name)) > enum_type_undef) {
- c_error = string_to_cstring(interpreter, class_name);
- internal_exception(1, "Class %s already registered!\n", c_error);
- string_cstring_free(c_error);
+ real_exception(interpreter, NULL, INVALID_OPERATION,
+ "Class %Ss already registered!\n", class_name);
}
new_type = pmc_register(interpreter, class_name);
/* Build a new vtable for this class