예제 #1
0
 /**
  * Calls the above method with simple value code and message, adds description<br>
  * Works on the more basic type {@link BaseResponse}
  */
 protected void addError(BaseResponse response, String code_description, Exception e) {
   BaseError error = new BaseError();
   String[] combo = code_description.split("#");
   error.setCode(combo[0]);
   error.setDescription(combo[1]);
   error.setMessage(LogicUtils.resolveE(e));
   response.getErrors().add(error);
 }
예제 #2
0
 /** Adds an error to a more basic {@link BaseResponse} */
 protected void addError(BaseResponse response, BaseError obj) {
   if (!response.isError()) response.setError(true);
   response.getErrors().add(obj);
 }