Sha256: f1b862812f7c7676c01357b8b79110befed1f27ba70565806a07ed2ad5e61eda

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

class Ld::ParameterError
  attr_accessor :clazz, :hint

  def initialize clazz, hint
    @clazz = clazz
    @hint = hint
  end

  def self.create clazz, &block
    runtime_error = self.new clazz
    block.call runtime_error
    runtime_error
  end

  def add_run

  end

  def raise hash
    lines = []
    case hash[:error_type]
      when :example
        # lines =
      when :scope
        lines = [
            "scope参数说明:",
            "  1 不能为空",
            "  2 格式'单元格1:单元格2',如'A1:B2'代表读取以A1与B2为对角的矩形范围中的所有内容",
        ]
    end

    lines.each{|line| puts line}

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ld-0.4.5 lib/ld/error/parameter_error.rb
ld-0.4.4 lib/ld/error/parameter_error.rb
ld-0.4.3 lib/ld/error/parameter_error.rb
ld-0.4.2 lib/ld/error/parameter_error.rb
ld-0.4.1 lib/ld/error/parameter_error.rb