pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // This file is part of Pike. For copyright information see COPYRIGHT.   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.372 2005/03/14 17:22:59 per Exp $ + // $Id: master.pike.in,v 1.373 2005/04/15 09:57:58 grubba Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:796:    {    mixed err=catch {    AUTORELOAD_CHECK_FILE(oname);    resolv_debug ("low_findprog %s: decoding dumped\n", fname);    INC_RESOLV_MSG_DEPTH();    ret = decode_value(master_read_file(oname),    (handler && handler->get_codec ||    get_codec)(fname, mkobj, handler));    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: dump decode ok\n", fname); -  return programs[fname] = ret; -  +  if (ret && ret->this_program_does_not_exist) { +  resolv_debug ("low_findprog %s: program claims not to exist\n", +  fname); +  return programs[fname] = 0; +  } +  else { +  resolv_debug("low_findprog %s: returning %O\n", fname, ret); +  return programs[fname]=ret; +  }    };    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: dump decode failed\n", fname);    programs[fname] = no_value;    call_compile_warning (handler, oname,    "Decode failed: " + describe_error(err));    } else if (out_of_date_warning) {    call_compile_warning (handler, oname,    "Compiled file is out of date");    }
pike.git/lib/master.pike.in:1017:    error("Cast %O to program failed%s.\n",    pname,    (current_file && current_file!="-") ? sprintf(" in %O",current_file) : "");   }         //! This function is called when an error occurs that is not caught   //! with catch().   void handle_error(array|object trace)   { +  // NB: Use predef::trace() to modify trace level here. +  // predef::trace(2);    if(mixed x=catch {    werror(describe_backtrace(trace));    }) {    // One reason for this might be too little stack space, which    // easily can occur for "out of stack" errors. It should help to    // tune up the STACK_MARGIN values in interpret.c then.    werror("Error in handle_error in master object:\n");    if(catch { -  +  // NB: Splited werror calls to retain some information +  // even if/when werror throws.    catch {    if (catch {    string msg = [string]x[0];    array bt = [array]x[1]; -  werror("%s%O\n", msg, bt); +  werror("%s", msg); +  werror("%O\n", bt);    }) {    werror("%O\n", x);    }    };    werror("Original error:\n"    "%O\n", trace);    }) {    werror("sprintf() failed to write error.\n");    }    } -  +  // predef::trace(0);   }      /* This array contains the names of the functions    * that a replacing master-object may want to override.    */   constant master_efuns = ({    "error",    "basename",    "dirname",    "is_absolute_path",