Class ExceptionHandler


  • public final class ExceptionHandler
    extends java.lang.Object
    Class with methods to handle OMERO exceptions
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void handleException​(java.lang.Throwable t, java.lang.String message)
      Helper method to convert an exception from: DSAccessException to AccessException DSOutOfServiceException to ServiceException ServerError to OMEROServerError
      static void handleServiceOrAccess​(java.lang.Throwable t, java.lang.String message)
      Helper method to convert an exception from: DSOutOfServiceException to ServiceException DSAccessException to AccessException
      static void handleServiceOrServer​(java.lang.Throwable t, java.lang.String message)
      Helper method to convert an exception from: DSOutOfServiceException to ServiceException ServerError to OMEROServerError
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • handleServiceOrServer

        public static void handleServiceOrServer​(java.lang.Throwable t,
                                                 java.lang.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​(java.lang.Throwable t,
                                                 java.lang.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.
      • handleException

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