shard-crystal-db/src/db/error.cr

33 lines
677 B
Crystal
Raw Normal View History

module DB
class Error < Exception
end
class MappingException < Exception
end
class PoolTimeout < Error
end
class PoolRetryAttemptsExceeded < Error
end
# Raised when an established connection is lost
# probably due to socket/network issues.
# It is used by the connection pool retry logic.
class ConnectionLost < Error
getter connection : Connection
def initialize(@connection)
end
end
# Raised when a connection is unable to be established
# probably due to socket/network or configuration issues.
# It is used by the connection pool retry logic.
class ConnectionRefused < Error
end
class Rollback < Exception
end
end