[yast-devel] Re: [yast-commit] <rest-service> master : Change calling conventions for Invalid parameters to follow DRY
* Josef Reidinger <jreidinger@suse.cz> [Sep 22. 2009 10:29]:
else logger.warn("No argument to update") - raise InvalidParameters.new [{:name => "language", :error => "Missing"}] + raise InvalidParameters.new :language => "Missing"
This is looking way better now, thanks Josef. Now I wonder if the "Missing" string shouldn't be replaced by a constant to make its semantic meaning clearer ?! Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf write:
* Josef Reidinger <jreidinger@suse.cz> [Sep 22. 2009 10:29]:
else logger.warn("No argument to update") - raise InvalidParameters.new [{:name => "language", :error => "Missing"}] + raise InvalidParameters.new :language => "Missing"
This is looking way better now, thanks Josef.
Now I wonder if the "Missing" string shouldn't be replaced by a constant to make its semantic meaning clearer ?!
Klaus
Yes, it is possible, but identifier is for frontend (so frontend must know this string) and it must also have meaning, because this string is used in rest response, so for anyone who want directly use REST backend via curl it should have some meaning. But I think that for missing value we should introduce constant. -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Josef Reidinger
-
Klaus Kaempf