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

37 lines
758 B
Crystal
Raw Normal View History

module DB
class Error < Exception
end
class MappingException < Error
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 < Error
end
2020-02-17 21:04:23 +00:00
# Raised when a scalar query returns no results.
class NoResultsError < Error
end
end