Class ExceptionHandler


  • public class ExceptionHandler
    extends Object
    Class with methods to handle OMERO exceptions
    • Method Detail

      • handleServiceOrServer

        public static void handleServiceOrServer​(Throwable t,
                                                 String message)
                                          throws ServiceException,
                                                 OMEROServerError
        Helper method to convert an exception from:
        • DSOutOfServiceException to ServiceException
        • ServerError to OMEROServerError
        Parameters:
        t - The Exception
        message - Short explanation of the problem.
        Throws:
        ServiceException - Cannot connect to OMERO.
        OMEROServerError - Server error.
      • handleServiceOrAccess

        public static void handleServiceOrAccess​(Throwable t,
                                                 String message)
                                          throws ServiceException,
                                                 AccessException
        Helper method to convert an exception from:
        • DSOutOfServiceException to ServiceException
        • DSAccessException to AccessException
        Parameters:
        t - The Exception
        message - Short explanation of the problem.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.