Branch: Tag:

2002-06-18

2002-06-18 16:17:13 by Martin Nilsson <mani@lysator.liu.se>

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.526
Rev: server/base_server/prototypes.pike:1.55
Rev: server/base_server/roxen.pike:1.810
Rev: server/modules/graphics/cimg.pike:1.50
Rev: server/modules/graphics/gbutton.pike:1.95
Rev: server/pike_modules/LazyImage.pmod/module.pmod:1.7

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/18 16:17:13 nilsson 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