wrappedException = e.getCause();
}
if (wrappedException instanceof ReportServiceException) {
throw (ReportServiceException) wrappedException;
} else if (wrappedException != null) {
throw new ReportServiceException(wrappedException.getLocalizedMessage(), wrappedException);
} else {
throw new ReportServiceException(e.getLocalizedMessage(), e);
}
}