Sha256: 32d29a4d5ee0e282c552bb4b975768d7eb07c820bd01a6691ec0db91eb30dda9

Contents?: true

Size: 825 Bytes

Versions: 5

Compression:

Stored size: 825 Bytes

Contents

module JobNotifier
  module Error
    class InvalidIdentifier < RuntimeError
      def initialize
        super("you need to pass a non blank identifier")
      end
    end

    class MissingAttributes < RuntimeError
      def initialize
        super("you need to execute identify_job_through method on host model")
      end
    end

    class BlankAttribute < RuntimeError
      def initialize(attribute)
        super("#{attribute} cant be blank")
      end
    end

    class InvalidAdapter < RuntimeError
      def initialize
        file_names = JobNotifier::Adapters.names.join(", ")
        super("The adapter must be one of: #{file_names}")
      end
    end

    class Validation < RuntimeError
      attr_reader :error

      def initialize(error)
        super
        @error = error
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
job_notifier-3.0.0 lib/job_notifier/error.rb
job_notifier-2.0.0 lib/job_notifier/error.rb
job_notifier-1.5.0 lib/job_notifier/error.rb
job_notifier-1.4.0 lib/job_notifier/error.rb
job_notifier-1.3.0 lib/job_notifier/error.rb