Package fr.igred.omero.exception
Class ExceptionHandler
- java.lang.Object
-
- fr.igred.omero.exception.ExceptionHandler
-
public final class ExceptionHandler extends Object
Class with methods to handle OMERO exceptions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidhandleException(Throwable t, String message)Helper method to convert an exception from: DSAccessException to AccessException DSOutOfServiceException to ServiceException ServerError to OMEROServerErrorstatic voidhandleServiceOrAccess(Throwable t, String message)Helper method to convert an exception from: DSOutOfServiceException to ServiceException DSAccessException to AccessExceptionstatic voidhandleServiceOrServer(Throwable t, String message)Helper method to convert an exception from: DSOutOfServiceException to ServiceException ServerError to OMEROServerError
-
-
-
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 Exceptionmessage- 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 Exceptionmessage- Short explanation of the problem.- Throws:
ServiceException- Cannot connect to OMERO.AccessException- Cannot access data.
-
handleException
public static void handleException(Throwable t, 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 Exceptionmessage- Short explanation of the problem.- Throws:
AccessException- Cannot access data.OMEROServerError- Server error.ServiceException- Cannot connect to OMERO.
-
-