Skip to content

Commit

Permalink
Update exception strings in PackFile_Header_validate
Browse files Browse the repository at this point in the history
They now use the correct function name
  • Loading branch information
aantn committed Jan 1, 2011
1 parent 82bc505 commit f8efe12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/packfile/api.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ PackFile_Header_validate(PARROT_INTERP, ARGIN(const PackFile_Header *self),
/* Ensure the magic is correct. */ /* Ensure the magic is correct. */
if (memcmp(self->magic, "\376PBC\r\n\032\n", 8) != 0) { if (memcmp(self->magic, "\376PBC\r\n\032\n", 8) != 0) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE, Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"PackFile_unpack: This is not a valid Parrot bytecode file."); "PackFile_Header_validate: This is not a valid Parrot bytecode file.");
} }


/* Ensure the bytecode version is one we can read. Currently, we only /* Ensure the bytecode version is one we can read. Currently, we only
Expand All @@ -712,25 +712,25 @@ PackFile_Header_validate(PARROT_INTERP, ARGIN(const PackFile_Header *self),
|| self->bc_minor != PARROT_PBC_MINOR) { || self->bc_minor != PARROT_PBC_MINOR) {
if (!(pf_options & PFOPT_UTILS)) if (!(pf_options & PFOPT_UTILS))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PARROT_USAGE_ERROR, Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PARROT_USAGE_ERROR,
"PackFile_unpack: This Parrot cannot read bytecode " "PackFile_Header_validate: This Parrot cannot read bytecode "
"files with version %d.%d.", "files with version %d.%d.",
self->bc_major, self->bc_minor); self->bc_major, self->bc_minor);
} }


/* Check wordsize, byte order and floating point number type are valid. */ /* Check wordsize, byte order and floating point number type are valid. */
if (self->wordsize != 4 && self->wordsize != 8) { if (self->wordsize != 4 && self->wordsize != 8) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE, Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"PackFile_unpack: Invalid wordsize %d\n", self->wordsize); "PackFile_Header_validate: Invalid wordsize %d\n", self->wordsize);
} }


if (self->byteorder != 0 && self->byteorder != 1) { if (self->byteorder != 0 && self->byteorder != 1) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE, Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"PackFile_unpack: Invalid byte ordering %d\n", self->byteorder); "PackFile_Header_validate: Invalid byte ordering %d\n", self->byteorder);
} }


if (self->floattype > FLOATTYPE_MAX) { if (self->floattype > FLOATTYPE_MAX) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE, Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"PackFile_unpack: Invalid floattype %d\n", self->floattype); "PackFile_Header_validate: Invalid floattype %d\n", self->floattype);
} }
} }


Expand Down

0 comments on commit f8efe12

Please sign in to comment.