• Tim Peters's avatar
    Introduced new exception ConnectionStateError, as a subclass of POSError, · c117040f
    Tim Peters authored
    raised when an operation on a Connection can't be performed because the
    Connection is in "a wrong state".
    
    Connection.close() now raises this exception if the connection is
    currently joined to a transaction (most obviously, if the transaction
    the connection is joined to has modified objects waiting for commit
    or abort).
    
    Also changed other appropriate instances of RuntimeError to raise
    ConnectionStateError instead (e.g., trying to load an object from a
    closed connection).
    c117040f
POSException.py 9.87 KB