Roxen.git / server / modules / graphics / cimg.pike

version» Context lines:

Roxen.git/server/modules/graphics/cimg.pike:1:   // This is a roxen module. Copyright © 1999 - 2009, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.88 2010/04/27 13:36:56 grubba Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.89 2010/11/26 17:11:52 mast 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 "   "to convert images between different image formats.";         mapping tagdocumentation()   {    Stdio.File file=Stdio.File();    if(!file->open(__FILE__,"r")) return 0;
Roxen.git/server/modules/graphics/cimg.pike:402:    "format":args->format,    "maxwidth":args->maxwidth,    "maxheight":args->maxheight,    "scale":args->scale,    "dither":args->dither,    "gamma":args->gamma,    "data":args->data,    ]);       if( args->src ) { +  // FIXME: Unacceptable error handling!    mixed err = catch    {    a->src = Roxen.fix_relative( args->src, id );    array(int)|Stat st = (id->conf->try_stat_file(a->src, id));    if (st)    {    string fn = id->conf->real_file( a->src, id );    if( fn ) Roxen.add_cache_stat_callback( id, fn, st[ST_MTIME] );    a->mtime = (string) (a->stat = st[ST_MTIME]);    a->filesize = (string) st[ST_SIZE];
Roxen.git/server/modules/graphics/cimg.pike:497:    report_debug("%s:%d restored cacheable flags\n", __FILE__, __LINE__);   #endif    id->misc->cacheable = cacheable;    id->misc->no_proto_cache = no_proto_cache;    return ({ res });    };   #ifdef DEBUG    report_error("<emit#cimg> error in get_dataset(): %s\n",    describe_backtrace(err));   #endif -  RXML.parse_error( "Illegal arguments or image\n" ); -  return ({}); +  string msg = describe_error (err); +  if (has_suffix (msg, "\n")) msg = msg[..<1]; +  RXML.parse_error( "Illegal arguments or image (%s).\n", msg);    }   }      class TagCImg   {    inherit RXML.Tag;    constant name = "cimg";    constant flags = RXML.FLAG_EMPTY_ELEMENT;       class Frame