pike.git / lib / modules / Search.pmod / Utils.pmod

version» Context lines:

pike.git/lib/modules/Search.pmod/Utils.pmod:1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Utils.pmod,v 1.33 2001/11/22 14:48:16 js Exp $ + // $Id: Utils.pmod,v 1.34 2002/04/19 13:41:12 js Exp $      #if !constant(report_error)   #define report_error werror   #define report_debug werror   #define report_warning werror   #endif      #ifdef SEARCH_DEBUG   # define WERR(X) report_debug("search: "+(X)+"\n");   #else
pike.git/lib/modules/Search.pmod/Utils.pmod:608:    }       //!    void log_event( int code, string type, void|string extra, void|int log_profile ) {    Sql.Sql db = get_db();    if(!db) return;       if(zero_type(log_profile))    log_profile = profile;    +  mixed err= +  catch +  {    if(extra)    db->query("INSERT INTO eventlog (profile,code,type,extra) VALUES (%d,%d,%s,%s)",    log_profile, code, type, extra);    else    db->query("INSERT INTO eventlog (profile, code,type) VALUES (%d,%d,%s)",    log_profile, code, type); -  +  }; +  if(err) +  werror(describe_backtrace(err));    }       //!    void log_error( int code, void|string extra, void|int log_profile ) {    log_event( code, "error", extra, log_profile );    }       //!    void log_warning( int code, void|string extra, void|int log_profile ) {    log_event( code, "warning", extra, log_profile );