lib/gm/notepad/exceptions.rb in gm-notepad-0.0.6 vs lib/gm/notepad/exceptions.rb in gm-notepad-0.0.8
- old
+ new
@@ -7,15 +7,18 @@
super("Duplicate key for #{key.inspect} in #{object}")
end
end
class MissingTableError < RuntimeError
def initialize(name:)
+ @name = name
super(%(Missing table "#{name}"))
end
+ alias to_buffer_message to_s
end
class MissingTableEntryError < RuntimeError
def initialize(table_name:, index:)
super(%(Missing index "#{index}" for table "#{table_name}"))
end
+ alias to_buffer_message to_s
end
end
end