Exception: XxxRename::Integrations::StashAPIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xxx_rename/integrations/stash_app.rb

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ StashAPIError

Returns a new instance of StashAPIError.



12
13
14
15
# File 'lib/xxx_rename/integrations/stash_app.rb', line 12

def initialize(errors)
  @errors = errors
  super(message)
end

Instance Method Details

#messageObject



17
18
19
20
21
22
23
24
25
# File 'lib/xxx_rename/integrations/stash_app.rb', line 17

def message
  msg = "Stash API returned error:\n"
  @errors.each do |e|
    s  = "\tMESSAGE #{e["message"]}\n"
    s += "\tOPERATION #{e["path"]} \n"
    msg += s
  end
  msg
end