String operation)
{
if (e instanceof NetworkException) {
/* Include the operation in the message */
Throwable cause = e.getCause();
e = new NetworkException(
operation + " failed due to a communication problem: " +
cause.getMessage(), cause);
} else if (e instanceof TransactionNotActiveException && txn != null) {
/*
* If the transaction is not active on the server, then it may have