Changeset 31712 for main/trunk/gli

Show
Ignore:
Timestamp:
29.05.2017 18:49:10 (2 years ago)
Author:
ak19
Message:

Logging on exception should happen regardless of whether the DEBUG flag is on or not. Exceptions are not debugging information. Also made some minor changes to a few comments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java

    r31707 r31712  
    917917    /* 
    918918    // On Macs (all Unix?) can't get the child processes of a process once it's been destroyed 
    919     macTerminateSubProcessesRecursively(pid, p); // pid, true)   
     919    macTerminateSubProcessesRecursively(pid, p); 
    920920    */ 
    921921     
    922922    if(pid == -1) { 
    923         p.destroy(); // at minimum, will have no effect if the process had already terminated  
     923        p.destroy(); // at minimum. Will have no effect if the process had already terminated  
    924924    } else { 
    925925        boolean forceKill = true; 
     
    936936 
    937937 
    938 // UNUSED and INCOMPLETE 
     938// UNUSED and INCOMPLETE METHOD 
    939939// But if this method is needed, then need to parse childpids printed by "pgrep -P pid" and write recursive step 
    940940// The childpids are probably listed one per line, see https://unix.stackexchange.com/questions/117227/why-pidof-and-pgrep-are-behaving-differently 
     
    14221422 
    14231423    public static void log(String msg, Exception e) { // Print stack trace on the exception 
    1424     if(DEBUG == 0) return; 
    14251424    //logger.error(msg, e); 
    14261425 
     
    14331432 
    14341433    public static void log(Exception e) { 
    1435     if(DEBUG == 0) return;       
    14361434    //logger.error(e); 
    14371435