case 1009: // future_version
return new FDBFutureVersionException(fdbEx);
case 1020: // not_committed
return new FDBNotCommittedException(fdbEx);
case 1021: // commit_unknown_result
return new FDBCommitUnknownResultException(fdbEx);
default:
return new FDBAdapterException(fdbEx);
}
} else if (e instanceof RuntimeException) {
return (RuntimeException)e;