question about error messages in service implementations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

question about error messages in service implementations

Anders Hessellund-2
Hi,

in the AgreementServices-class, there is a getCommissionForProduct(..)
method which implements a similarly named service. In lines 89-95 the code
handles an error

        // either ACCOUNTING_COMM_VIEW or ACCOUNTING_MANAGER should be

> allowed to see commission amounts
>         if (!security.hasEntityPermission("ACCOUNTING", "_COMM_VIEW",
> userLogin)) {
>             result.put(ModelService.RESPONSE_MESSAGE,
> ModelService.RESPOND_ERROR);
>             errMsg = UtilProperties.getMessage(ServiceUtil.resource, "
> serviceUtil.no_permission_to_operation", locale) + ".";
>             result.put(ModelService.ERROR_MESSAGE, errMsg);
>             return result;
>         }


instead of returning the requirede out-keys, it returns to error-related
keys (constants from the ModelService-class). Is there any written
documentation or tips on this kind of exit strategy for failed service
executions? I am interested in what the recommended use of such constant is.

-- Anders
Reply | Threaded
Open this post in threaded view
|

Re: question about error messages in service implementations

Edison
For this season, that bag mens watches is the Michael Kors Astor Huge Satchel. This satchel designer handbags is ultra chic and has just the appropriate quantity of rocker-chick vibe with it rolex watches is stud detailing on soft calf-skin leather. No matter whether this bag will stand the test of time,bags facts I don't hermes wallet know, but for beneath $300, it really is definitely a good catch for chanel j12 a bag from a top-notch designer and one particular I'll be reaching for on numerous gucci watches occasions. Invest in by way of ampmfashion.com for $249. Christmas is just around the corner — you are wondering what you can get as a miu miu gift for her. You should try a Purseket Purse Organizer (available at their website, www.Purseket.com)?If you don’t hublot know what a removable purse organizer is, let me explain… Think of the handbag organizer from Purseket as a brand new insides for your handbag. It’s a removable panel of compartments that you can insert into your purse which will give your purse many more pockets inside to facilitate keeping your prada possessions organized. It’s just one of those simple but effective products.