Branch: Tag:

2000-11-02

2000-11-02 11:33:59 by Per Hedbor <ph@opera.com>

Fixed [Bug 630 (#630)] -- errors in start no longer makes it impossible to reload modules

Rev: server/base_server/configuration.pike:1.389

1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.388 2000/11/02 08:48:45 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.389 2000/11/02 11:33:59 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
2001:    foreach(indices(modules[modname]->copies), int i)    {    store(modname+"#"+i, modules[modname]->copies[i]->query(), 0, this_object()); -  modules[modname]->copies[i]->start(2, this_object()); +  catch(modules[modname]->copies[i]->start(2, this_object()));    }    }    invalidate_cache();
2023:       store(q, o->query(), 0, this_object());    invalidate_cache(); -  o->start(2, this_object()); +  mixed error; +  if( error = catch( o->start(2, this_object()) ) ) +  { +  if( objectp(error ) ) +  error = (array)error; +  if( sizeof(error)>1 && arrayp( error[1] ) ) +  { +  int i; +  for( i = 0; i<sizeof( error[1] ); i++ ) +  if( error[1][i][2] == save_one ) +  break; +  error[1] = error[1][i+1..]; +  } +  if( o->report_error ) +  o->report_error( "Call to start failed.\n"+describe_backtrace( error ) ); +  else +  report_error( "Call to start failed.\n"+describe_backtrace( error )); +  }    invalidate_cache();    return 1;   }
2148:    if(module[id] && module[id] != me)    {    if( module[id]->stop ) -  module[id]->stop(); +  catch( module[id]->stop() );   // if( err = catch( disable_module( modname+"#"+id ) ) )   // report_error(LOCALE->error_disabling_module(moduleinfo->get_name(),   // describe_backtrace(err)));