public abstract class OrgAsyncCallback<T> implements AsyncCallback<T> {
@Override
public void onFailure(Throwable t) {
ExceptionByErrorCode ebe;
if (t instanceof OrgActionException) {
ebe = (ExceptionByErrorCode)t.getCause();
}
else {
ebe = getEbeCause(t);
}
if (ebe == null) {
ebe = new ExceptionByErrorCode(OrgErrorCodes.MODULE_CODE,
OrgErrorCodes.UNKOWN_ERROR, t.getMessage(), t);
}
Logger.error("Error: " + t.getClass().getName() +
" - " + t.getMessage(), t);