if (e != null && e.getCause() != null && e.getCause() instanceof ServiceManagerException) { ServiceManagerException serviceManagerException = (ServiceManagerException) e.getCause(); if (serviceManagerException.getCause() != null && serviceManagerException.getCause() instanceof NotAuthorizedException) { NotAuthorizedException notAuthorizedException = (NotAuthorizedException) serviceManagerException.getCause(); throw notAuthorizedException; } }
    public static Object executeService(IUserView userView, String serviceName, Object[] serviceArgs)            throws FenixServiceException, FenixFilterException {        try {            return service.execute(userView, serviceName, serviceArgs);        } catch (ServiceManagerDefaultImpl.ExceptionWrapper e) {            if (e != null && e.getCause() != null && e.getCause() instanceof FenixServiceException) {                FenixServiceException fenixServiceException = (FenixServiceException) e.getCause();                throw fenixServiceException;            }            if (e != null && e.getCause() != null && e.getCause() instanceof DomainException) {                DomainException domainException = (DomainException) e.getCause();                throw domainException;            }            if (e != null && e.getCause() != null && e.getCause() instanceof FileManagerException) {                FileManagerException fileManagerException = (FileManagerException) e.getCause();                throw fileManagerException;            }            if (e != null && e.getCause() != null && e.getCause() instanceof FenixFilterException) {                FenixFilterException fenixFilterException = (FenixFilterException) e.getCause();                throw fenixFilterException;            }            throw new FenixRemoteServiceException(e);        }    }