mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
2ca60ba43f
* required to fix retry+connection initialization corner case.
32 lines
677 B
Crystal
32 lines
677 B
Crystal
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
|