Skip to content

Commit

Permalink
ruby/isubank: fix exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed Oct 19, 2018
1 parent 30b81e7 commit ee09c65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/ruby/isubank/lib/isubank.rb
Expand Up @@ -57,7 +57,7 @@ def reserve(bank_id, price)
when 'credit is insufficient'
raise CreditInsufficientError, response[:error]
else
raise Error, "check failed: #{response[:error]}"
raise Error, "reserve failed: #{response[:error]}"
end
end
response.fetch(:reserve_id)
Expand All @@ -76,7 +76,7 @@ def commit(reserve_ids)
when 'credit is insufficient'
raise CreditInsufficientError, response[:error]
else
raise Error, "check failed: #{response[:error]}"
raise Error, "commit failed: #{response[:error]}"
end
end
nil
Expand All @@ -89,7 +89,7 @@ def commit(reserve_ids)
def cancel(reserve_ids)
response, ok = request('/cancel', reserve_ids: reserve_ids)
unless ok
raise Error, "check failed: #{response[:error]}"
raise Error, "cancel failed: #{response[:error]}"
end
nil
end
Expand Down

0 comments on commit ee09c65

Please sign in to comment.