Skip to content

Commit

Permalink
- more logging in server process
Browse files Browse the repository at this point in the history
- fix for bas ascii in comment

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6084 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Jun 16, 2009
1 parent b5bc399 commit fd31a36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
30 changes: 12 additions & 18 deletions source/de/anomic/server/serverCore.java
Expand Up @@ -770,40 +770,34 @@ private void listen() {
}
if (terminate) break;

} catch (final InvocationTargetException ite) {
System.out.println("ERROR A " + this.userAddress.getHostAddress());
} catch (final InvocationTargetException e) {
log.logSevere("command execution, target exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// we extract a target exception and let the thread survive
writeLine(this.commandObj.error(ite.getTargetException()));
} catch (final NoSuchMethodException nsme) {
System.out.println("ERROR B " + this.userAddress.getHostAddress());
writeLine(this.commandObj.error(e.getTargetException()));
} catch (final NoSuchMethodException e) {
log.logSevere("command execution, method exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
if (!this.userAddress.isSiteLocalAddress()) {
if (serverCore.this.denyHost != null) {
serverCore.this.denyHost.put((""+this.userAddress.getHostAddress()), "deny"); // block client: hacker attempt
}
}
break;
// the client requested a command that does not exist
//Object[] errorParameter = { nsme };
//writeLine((String) error.invoke(this.cmdObject, errorParameter));
} catch (final IllegalAccessException iae) {
System.out.println("ERROR C " + this.userAddress.getHostAddress());
} catch (final IllegalAccessException e) {
log.logSevere("command execution, illegal access exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// wrong parameters: this an only be an internal problem
writeLine(this.commandObj.error(iae));
writeLine(this.commandObj.error(e));
} catch (final java.lang.ClassCastException e) {
System.out.println("ERROR D " + this.userAddress.getHostAddress());
log.logSevere("command execution, cast exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// ??
writeLine(this.commandObj.error(e));
} catch (final Exception e) {
System.out.println("ERROR E " + this.userAddress.getHostAddress());
log.logSevere("command execution, generic exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// whatever happens: the thread has to survive!
writeLine("UNKNOWN REASON:" + this.commandObj.error(e));
}
} // end of while
} /* catch (java.lang.ClassNotFoundException e) {
System.out.println("Internal error: Wrapper class not found: " + e.getMessage());
System.exit(0);
} */ catch (final java.io.IOException e) {
// connection interruption: more or less normal
} catch (final IOException e) {
log.logSevere("command execution, IO exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
}
//announceMoreExecTime(System.currentTimeMillis() - this.start);
}
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/tools/SignatureOutputStream.java
Expand Up @@ -5,7 +5,7 @@
//
// This is a part of YaCy, a peer-to-peer based web search engine
//
// $LastChangedDate: 2009-03-30 17:31:25 +0200 (Mo, 30. Mär 2009) $
// $LastChangedDate: 2009-03-30 17:31:25 +0200 (Mo, 30. March 2009) $
// $LastChangedRevision: 5756 $
// $LastChangedBy: orbiter $
//
Expand Down

0 comments on commit fd31a36

Please sign in to comment.