Marvin Humphrey wrote on 1/6/11 9:31 PM:
> If we change allot_params() to return false and store an exception object in
> Err_error on failure, then the calling code can RETHROW the exception...
>
> bool_t args_ok = XSBind_allot_params( &(ST(0)), 1,
> items, "Lucy::Search::IndexSearcher::new_PARAMS",
> &index_sv, "index", 5,
> NULL);
> if (!args_ok) {
> RETHROW(INCREF(Err_get_error()));
> }
>
> ... so that we see its location in the stack trace instead.
>
> Invalid parameter: 'bogus'
> cfish_XSBind_allot_params at xs/XSBind.c line 408
> XS_Lucy_Search_IndexSearcher_new at lib/Lucy.xs line 1647
> at foo.t line 5
>
> "XS_Lucy_Search_IndexSearcher_new" isn't quite as good as
> "Lucy::Search::IndexSearcher::new", but it's better than nothing.
>
+1
--
Peter Karman . http://peknet.com/ . [email protected]