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

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.49 2001/10/08 12:32:52 anders Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.50 2002/06/17 09:36:33 anders Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "
140:    s[0], Roxen.sizetostring(s[1]));   }    - array(Image.Layer) generate_image( mapping args, RequestID id ) + array(Image.Layer)|mapping generate_image( mapping args, RequestID id )   {    array layers;    mapping opts = ([]);
156:    if( args->data )    layers = roxen.decode_layers( args->data, opts );    else -  layers = roxen.load_layers( args->src, id, opts ); +  { +  mixed tmp = roxen.load_layers( args->src, id, opts ); +  if (mappingp(tmp) && tmp->error == 401) +  return tmp; +  else layers = tmp; +  }       if(!layers)    {