Changeset 31586
- Timestamp:
- 2017-04-06T21:16:02+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java
r31585 r31586 184 184 185 185 } catch(IOException ioe) { 186 //logger.error("IOexception: " + ioe.getMessage(), ioe); 187 System.err.println("IOexception " + ioe.getMessage()); 188 ioe.printStackTrace(); 189 if(exceptionHandler != null) exceptionHandler.gotException(ioe); 186 if(exceptionHandler != null) { 187 exceptionHandler.gotException(ioe); 188 } else { 189 //logger.error("IOexception: " + ioe.getMessage(), ioe); 190 System.err.println("IOexception " + ioe.getMessage()); 191 ioe.printStackTrace(); 192 } 190 193 } catch(InterruptedException ie) { 191 //logger.error("Process InterruptedException: " + ie.getMessage(), ie); 192 System.err.println("Process InterruptedException " + ie.getMessage()); 193 ie.printStackTrace(); 194 195 if(exceptionHandler != null) exceptionHandler.gotException(ie); 194 if(exceptionHandler != null) { 195 exceptionHandler.gotException(ie); 196 } else { 197 //logger.error("Process InterruptedException: " + ie.getMessage(), ie); 198 System.err.println("Process InterruptedException " + ie.getMessage()); 199 //ie.printStackTrace(); // an interrupt here is not an error, it can be a cancel action 200 } 201 196 202 197 203 // propagate interrupts to worker threads here? … … 311 317 } 312 318 } catch (IOException ioe) { 313 //logger.error("Exception when reading from a process' stdout/stderr stream: ", ioe); 314 //ioe.printStackTrace(); 315 316 if(lineByLineHandler != null) lineByLineHandler.gotException(ioe); 319 if(lineByLineHandler != null) { 320 lineByLineHandler.gotException(ioe); 321 } else { 322 //logger.error("Exception when reading from a process' stdout/stderr stream: ", ioe); 323 ioe.printStackTrace(); 324 } 317 325 318 326 } finally { … … 377 385 */ 378 386 } catch (IOException ioe) { 379 //logger.error("Exception writing to SafeProcess' inputstream: ", ioe); 380 ioe.printStackTrace(); 381 382 if (this.exceptionHandler != null) this.exceptionHandler.gotException(ioe); 387 if (this.exceptionHandler != null) { 388 this.exceptionHandler.gotException(ioe); 389 } else { 390 //logger.error("Exception writing to SafeProcess' inputstream: ", ioe); 391 ioe.printStackTrace(); 392 } 383 393 384 394 } finally {
Note:
See TracChangeset
for help on using the changeset viewer.