Branch: Tag:

2002-06-17

2002-06-17 09:36:34 by Anders Johansson <anders@roxen.com>

Implemented some error handling in try_get_file() and load_layers() in order to solve [bug 2410 (#2410)].

Rev: server/base_server/configuration.pike:1.520
Rev: server/base_server/prototypes.pike:1.51
Rev: server/base_server/roxen.pike:1.797
Rev: server/etc/modules/LazyImage.pmod/module.pmod:1.7
Rev: server/modules/graphics/cimg.pike:1.50
Rev: server/modules/graphics/gbutton.pike:1.95

25:   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.94 2002/04/15 08:53:48 jonasw Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.95 2002/06/17 09:36:34 anders Exp $";   constant thread_safe = 1;      #include <module.h>
230:    return o;   }    - array(Image.Layer) draw_button(mapping args, string text, object id) + array(Image.Layer)|mapping draw_button(mapping args, string text, object id)   {    Image.Image text_img;    mapping icon;
262:    };       if( args->border_image ) -  set_image( roxen.load_layers(args->border_image, id) ); +  { +  array(Image.Layer)|mapping tmp = roxen.load_layers(args->border_image, id); +  if (mappingp(tmp)) +  if (tmp->error == 401) +  return tmp; +  else +  report_debug("GButton: Failed to load frame image: %O\n", +  args->border_image); +  set_image( tmp ); +  }          // otherwise load default images