I think I'll need to revert this change. I must have missed an error in my regressions. It turns out tools/derbyrunjartest.java breaks with this patch:
> Fri Sep 30 01:56:07 GMT+01:00 2011 : DRDA_NoCommand.U:No command given.
> java.lang.Exception: DRDA_NoCommand.U:No command given.
The logic in the server is confusing. It turns out the extra message above comes from my patch. When the server analyzes incorrect commands in derbyrunjartest, the serves prints a usage legend while inside NetwrokControlServerImpl. Since something has already been printed, the above exception is suppressed by default. "server.consoleExceptionPrint(e)" does nothing unless a debug flag is on - contrary to its name if I may add, hence confusing...
The reason I wanted to make sure we printed unconditionally was code added for
DERBY-5363 which, if it saw an error, had printed nothing at this point in the code. I'll let that code handle its own exception printing instead, and back this patch out. Note, the server can still die silently if an exception with string NetworkServerControlImpl.UNEXPECTED_ERR, but this would be a coding error I presume.