lib/rdkafka/error.rb in karafka-rdkafka-0.12.4 vs lib/rdkafka/error.rb in karafka-rdkafka-0.13.0.beta1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Rdkafka # Base error class. class BaseError < RuntimeError; end # Error returned by the underlying rdkafka library. @@ -79,8 +81,15 @@ # Error class for public producer method calls on a closed producer. class ClosedProducerError < BaseError def initialize(method) super("Illegal call to #{method.to_s} on a closed producer") + end + end + + # Error class for public consumer method calls on a closed admin. + class ClosedAdminError < BaseError + def initialize(method) + super("Illegal call to #{method.to_s} on a closed admin") end end end