dodb.cr/src/dodb/exceptions.cr

18 lines
313 B
Crystal
Raw Normal View History

2019-12-11 22:08:26 +01:00
class DODB::MissingEntry < Exception
2019-12-11 22:08:26 +01:00
getter index : String?
2019-12-18 03:43:09 +01:00
getter key : String | Int32
2019-12-11 22:08:26 +01:00
def initialize(@index, @key)
super "no entry in index '#{@index}' for key '#{@key}''"
end
def initialize(@key)
super "no entry for key '#{@key}' in database"
end
end
class DODB::IndexOverload < Exception
2019-12-11 22:08:26 +01:00
end