2016-06-28 17:02:08 +00:00
|
|
|
module DB
|
|
|
|
class Error < Exception
|
|
|
|
end
|
2016-03-28 23:45:07 +00:00
|
|
|
|
2017-11-08 02:18:43 +00:00
|
|
|
class MappingException < Error
|
2016-03-28 23:45:07 +00:00
|
|
|
end
|
2016-07-05 18:21:39 +00:00
|
|
|
|
|
|
|
class PoolTimeout < Error
|
|
|
|
end
|
2016-08-31 20:32:01 +00:00
|
|
|
|
|
|
|
class PoolRetryAttemptsExceeded < Error
|
|
|
|
end
|
|
|
|
|
2016-12-15 17:40:56 +00:00
|
|
|
# Raised when an established connection is lost
|
|
|
|
# probably due to socket/network issues.
|
|
|
|
# It is used by the connection pool retry logic.
|
2016-08-31 20:32:01 +00:00
|
|
|
class ConnectionLost < Error
|
|
|
|
getter connection : Connection
|
|
|
|
|
|
|
|
def initialize(@connection)
|
|
|
|
end
|
|
|
|
end
|
2016-11-16 02:46:11 +00:00
|
|
|
|
2016-12-15 17:40:56 +00:00
|
|
|
# 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
|
|
|
|
|
2017-11-08 02:18:43 +00:00
|
|
|
class Rollback < Error
|
2016-11-16 02:46:11 +00:00
|
|
|
end
|
2020-02-17 21:04:23 +00:00
|
|
|
|
|
|
|
# Raised when a scalar query returns no results.
|
|
|
|
class NoResultsError < Error
|
|
|
|
end
|
2016-06-28 17:02:08 +00:00
|
|
|
end
|