projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
540a918
)
Make moose_throw_error more robust
gfx [Wed, 19 Aug 2009 03:44:30 +0000 (12:44 +0900)]
Moose.xs
patch
|
blob
|
blame
|
history
diff --git
a/Moose.xs
b/Moose.xs
index
4020580
..
6db0b4e
100644
(file)
--- a/
Moose.xs
+++ b/
Moose.xs
@@
-86,6
+86,9
@@
moose_throw_error(SV* const klass, SV* const data, const char* const fmt, ...){
va_list args;
SV* message;
+ assert(klass);
+ assert(fmt);
+
va_start(args, fmt);
message = vnewSVpvf(fmt, &args);
va_end(args);
@@
-105,6
+108,7
@@
moose_throw_error(SV* const klass, SV* const data, const char* const fmt, ...){
}
PUTBACK;
call_method("throw_error", G_VOID);
+ croak("throw_error() did not throw the error (%"SVf")", message);
}
}