org.onebusaway.exceptions
Class ServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.onebusaway.exceptions.ServiceException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- InvalidArgumentServiceException, InvalidSelectionServiceException, NoSuchRouteServiceException, NoSuchServicePatternServiceException, NoSuchStopServiceException, NoSuchTripServiceException, ServiceAreaServiceException
public class ServiceException
- extends RuntimeException
A base exception type that is used by many OneBusAway service methods. I
decided to make this base exception a sub-class of RuntimeException
,
which means that you do no have to explicitly wrap calls to methods that
throw ServiceException
with catch or with throws. There is a lot of
debate about that behavior in the Java community. Generally speaking, if
errors are non-recoverable, the convention is to make them a runtime
exception. However, there are definitely a number of uses of
ServiceException
and its subclasses that are recoverable. Perhaps
some refactoring is in order?
- Author:
- bdferris
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ServiceException
public ServiceException()
ServiceException
public ServiceException(String message)
ServiceException
public ServiceException(Throwable ex)
Copyright © 2012 OneBusAway. All Rights Reserved.