ref: refs/heads/master
commit b124b4609e536320def9cc09dd0fef4b6683c4e6
Author: Josef Reidinger
Date: Mon Sep 21 11:16:07 2009 +0200
change implementation to match Error reporting structure of ActiveResource
---
webservice/lib/exceptions.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/webservice/lib/exceptions.rb b/webservice/lib/exceptions.rb
index c932852..1f2abc1 100644
--- a/webservice/lib/exceptions.rb
+++ b/webservice/lib/exceptions.rb
@@ -42,7 +42,7 @@ class InvalidParameters < ArgumentError
end
# Creates standartized xml for ActiveResource validation - http://railsbrain.com/api/rails-2.3.2/doc/index.html?a=C00000626&name=Base
- # error is reported in format 'Invalid: <argument name> --- <error identificator>
+ # error is reported in format '<humanized argument name> --- <error identificator>
def to_xml()
xml = Builder::XmlMarkup.new(options)
xml.instruct! unless options[:skip_instruct]
@@ -50,7 +50,7 @@ class InvalidParameters < ArgumentError
xml.errors(:type => "array") do
@constrains.each {
|c|
- xml.error "Invalid: #{c[:name]} --- #{c[:error]}"
+ xml.error "#{c[:name].humanize} --- #{c[:error]}"
}
end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org