Sha256: 98937458ce8673af3b36e243026c25ae4271888c05ae4433e537ccd59db971b0
Contents?: true
Size: 760 Bytes
Versions: 2
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true module Dingtalk class Robot # Basic exception class Error < StandardError; end # :nodoc: class ConfigurationError < Error attr_reader :key, :value, :valid_values def initialize(key, value, valid_values) @key = key @valud = value @valid_values = valid_values valid_values_str = Array(valid_values).join(', ') message = if value.blank? "#{key} not configured or configured with blank value, valid_values: #{valid_values_str}" else "Configure #{key} with value #{value} failed, valid_values: #{valid_values_str}" end super(message) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dingtalk-robot-0.2.1 | lib/dingtalk/robot/errors.rb |
dingtalk-robot-0.2.0 | lib/dingtalk/robot/errors.rb |