Exception: S7n::NoSuchEntry

Inherits:
ApplicationError show all
Defined in:
lib/s7n/exception.rb

Overview

機密情報が存在しないことを表現する例外クラス。

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ NoSuchEntry

Returns a new instance of NoSuchEntry.



42
43
44
# File 'lib/s7n/exception.rb', line 42

def initialize(options = {})
  @options = options
end

Instance Method Details

#to_sObject



46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/s7n/exception.rb', line 46

def to_s
  if !@options.empty?
    s = ""
    @options.each do |key, value|
      s << " #{key}=<#{value}>"
    end
  end
  if s.empty?
    return _("No such entry.")
  else
    return _("No such entry:%s") % s
  end
end