Various fixes and cleanup :

* Always return at least success information
* Fix issues with Wishes
* Fix issues with Circulations
* Fix typos in exceptions
This commit is contained in:
Gilles Crettenand
2015-06-03 10:02:28 +02:00
parent b81dacd194
commit da0efd72be
5 changed files with 42 additions and 20 deletions

View File

@@ -95,10 +95,10 @@ abstract class WebService
/* Check the number of arguments. */
if ($nbParams < $nbArgsFix) {
throw new UsageException("TooManyArgs", "You must provide at least $nbArgsFix arguments.", UsageException::TOO_MANY_ARGS);
throw new UsageException("TooFewArgs", "You must provide at least $nbArgsFix arguments.", UsageException::TOO_FEW_ARGS);
}
if ($nbParams > $nbArgs) {
throw new UsageException("TooFewArgs", "You must provide at most $nbArgs arguments.", UsageException::TOO_FEW_ARGS);
throw new UsageException("TooManyArgs", "You must provide at most $nbArgs arguments.", UsageException::TOO_MANY_ARGS);
}
$this->log("Calling '".$this->func."'");