lib/gm/notepad/exceptions.rb in gm-notepad-0.0.11 vs lib/gm/notepad/exceptions.rb in gm-notepad-0.0.12
- old
+ new
@@ -18,7 +18,16 @@
def initialize(table_name:, index:)
super(%(Missing index "#{index}" for table "#{table_name}"))
end
alias to_buffer_message to_s
end
+
+ class ExceededTimeToLiveError < RuntimeError
+ attr_reader :text_when_time_to_live_exceeded
+ def initialize(text:, time_to_live:, text_when_time_to_live_exceeded:)
+ @text_when_time_to_live_exceeded = text_when_time_to_live_exceeded
+ super(%(Expanding the given text "#{text}" exceed the time to live of #{time_to_live}))
+ end
+ alias to_buffer_message to_s
+ end
end
end