Sha256: 33ae9e0a14709d963aa4223b613e89054f87aef849db0ababa74eaaee02168ff

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

# encoding: UTF-8

module Rosette
  module Core

    # Raises errors instead of printing or logging them.
    class RaisingErrorReporter < ErrorReporter
      # Raises an error.
      #
      # @param [Exception] error The error to raise.
      # @param [Hash] options A hash of associated options.
      # @return [void]
      def report_error(error, options = {})
        raise error
      end

      # Does nothing.
      #
      # @param [Exception] error An error, but nothing is done with it.
      # @param [Hash] options A hash of associated options.
      # @return [void]
      def report_warning(error, options = {})
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rosette-core-1.0.1 lib/rosette/core/error_reporters/raising_error_reporter.rb