org.onebusaway.exceptions
Class ServiceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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

Constructor Summary
ServiceException()
           
ServiceException(String message)
           
ServiceException(Throwable ex)
           
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceException

public ServiceException()

ServiceException

public ServiceException(String message)

ServiceException

public ServiceException(Throwable ex)


Copyright © 2012 OneBusAway. All Rights Reserved.