2014-05-22
2014-05-22 14:51:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
99a96a3d1158c020bd552c3706023451524a2445
(20 lines)
(+14/-6)
[
Show
| Annotate
]
Branch: 99a96a3d1158c020bd552c3706023451524a2445
Image-Cache: Improved robustness against renderer problems.
Return error 404 to higher levels (eg the RXML parser) when
the renderer fails.
Fixes 500-errors when cimg can't find source image.
6:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.1118 2012/06/21 18:15:40 mast Exp $";
+ constant cvs_version="$Id$";
//! @appears roxen
//!
3471: Inside #if defined(ARG_CACHE_DEBUG)
#ifdef ARG_CACHE_DEBUG
werror("draw args: %O\n", args );
#endif
- mixed reply = draw_function( @copy_value(args), id );
+ mixed reply;
+ if (mixed err = catch {
+ reply = draw_function( @copy_value(args), id );
+ }) {
+ master()->handle_error(err);
+ return;
+ }
if( !reply ) {
#ifdef ARG_CACHE_DEBUG
4273:
throw (err);
}
if( !(res = restore( na,id )) ) {
- error("Draw callback %O did not generate any data.\n"
+ report_error("Draw callback %O did not generate any data.\n"
"na: %O\n"
"id: %O\n",
draw_function, na, id);
-
+ return 0;
}
}
res->stat = ({ 0, 0, 0, 900000000, 0, 0, 0, 0, 0 });