##############################################################
# Public Exceptions
##############################################################

class NotConnectedError(Exception):
  """This exception indicates the executed action cannot take place without
     starting a connection"""

class NotBoundError(Exception):
  """This exception indicates the executed action cannot take place without
     binding to a local address"""

class TimeoutError(Exception):
  """This exception indicates that the peer is not responded in enough time"""

class UnknownStateError(Exception):
  """This exception indicates our connection is in an unexpected state"""

class AlreadyConnectedError(Exception):
  """This exception indicates our connection is already initiated"""   

class NotEstablishedError(Exception):
  """This exception indicates our connection is already established"""   

class NotRequestedError(Exception):
  """This exception indicates a connection has not been requested"""

class AlreadyClosingError(Exception):
  """This exception indicates our connection is already closing"""


##### Controller Specific Errors ######

class PortAlreadyBoundError(Exception):
  """ A port was attempted to be bound but was previously bound by another 
  Connection """

class PortNotOwnedError(Exception):
  """ A Connection tried to use a port it didn't own """

class ControllerAlreadyStartedError(Exception):
  """ A Controller was started multiple times without being stopped """
  
class ControllerStoppedError(Exception):
  """ A Controller was used without being started """
  
class ControllerHasConnections(Exception):
  """ Tried to stop a controller which still has connections registered """
