Changeset 2774 for trunk/gsdl/src


Ignore:
Timestamp:
2001-10-02T22:36:37+12:00 (23 years ago)
Author:
sjboddie
Message:

Tidied up the collector's error handling. Hopefully the situation where the
status page loops continuously after an error will now be rare (it can
still happen if perl or one of the third party converters hangs though)

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/collectoraction.cpp

    r2727 r2774  
    457457      ifstream fbld_in (fbldc);
    458458      if (fbld_in) {
    459     char c = fbld_in.get();
     459    failcode = fbld_in.get();
    460460    fbld_in.close();
    461     if (c == '0') {
     461    if (failcode == '0') {
    462462      // success - we need to create and configure a collection server for the
    463463      // newly built collection (for fastcgi and local library where
     
    467467      current_page = "bilddone";
    468468    }
    469     else if (c == '4' || c == '5') message = "installfail";
    470469    else current_page = "bildfail";
    471470      } else {
     
    10271026  // _statusline_ -- if displaying the bildstatus page
    10281027  // _header_ -- may be set for pages that require it
     1028  // _textfailmsg_ -- set to different messages depending on failcode returned
     1029  //                  by build script (if build fails)
    10291030  // _faillog_ - set to last 6 lines of .bld file if build failed
    10301031  // _gsdlhome_ - the gsdlhome path (dm_safe)
     
    11551156
    11561157  if (collector_page == "bildfail") {
     1158
     1159    text_t textfailmsg = "_textfailmsg";
     1160    textfailmsg.push_back(failcode);
     1161    textfailmsg.push_back('_');
     1162    disp.setmacro("textfailmsg", "collector", textfailmsg);
     1163
    11571164    text_t bldlog = filename_cat(gsdlhome, "tmp", args["bc1tmp"], args["bc1dirname"] + ".bld");
    11581165    text_t rawlog = file_tail (bldlog, 6, 0);
  • trunk/gsdl/src/recpt/collectoraction.h

    r2627 r2774  
    4242
    4343  text_t message;
     44  char failcode;
    4445
    4546  bool do_mkcol;
Note: See TracChangeset for help on using the changeset viewer.