additional log info added
This commit is contained in:
parent
9e58762796
commit
3f79f707b2
|
|
@ -63,14 +63,14 @@ public abstract class ApiModel {
|
|||
throw exception;
|
||||
case EXCEPTION_IF_ALL_INVALID:
|
||||
iterator.remove();
|
||||
Lc.e(exception, "Item %s is invalid", position);
|
||||
Lc.e(exception, "Item %s is invalid at " + Lc.getCodePoint(null, 1), position);
|
||||
if (!iterator.hasNext() && !haveValidItem) {
|
||||
throw new ValidationException("Whole list is invalid");
|
||||
throw new ValidationException("Whole list is invalid at " + Lc.getCodePoint(null, 1));
|
||||
}
|
||||
break;
|
||||
case REMOVE_INVALID_ITEMS:
|
||||
iterator.remove();
|
||||
Lc.e(exception, "Item %s is invalid", position);
|
||||
Lc.e(exception, "Item %s is invalid at " + Lc.getCodePoint(null, 1), position);
|
||||
break;
|
||||
default:
|
||||
Lc.assertion("Unexpected rule " + collectionValidationRule);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import com.google.api.client.json.JsonFactory;
|
|||
import com.google.api.client.json.jackson2.JacksonFactory;
|
||||
import com.google.api.client.util.Data;
|
||||
|
||||
import ru.touchin.roboswag.core.log.Lc;
|
||||
import ru.touchin.templates.ApiModel;
|
||||
|
||||
/**
|
||||
|
|
@ -78,7 +79,7 @@ public abstract class GoogleJsonModel extends ApiModel {
|
|||
*/
|
||||
protected static void validateNotNull(@Nullable final Object object) throws ValidationException {
|
||||
if (isNullOrMissed(object)) {
|
||||
throw new ValidationException("Not nullable object is null or missed");
|
||||
throw new ValidationException("Not nullable object is null or missed at " + Lc.getCodePoint(null, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +91,7 @@ public abstract class GoogleJsonModel extends ApiModel {
|
|||
*/
|
||||
protected static void validateNotMissed(@Nullable final Object object) throws ValidationException {
|
||||
if (isMissed(object)) {
|
||||
throw new ValidationException("Object missed");
|
||||
throw new ValidationException("Object missed at " + Lc.getCodePoint(null, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ public abstract class GoogleJsonModel extends ApiModel {
|
|||
*/
|
||||
protected static void validateMissedOrNotNull(@Nullable final Object object) throws ValidationException {
|
||||
if (isNull(object)) {
|
||||
throw new ValidationException("Not null or not missed object is null");
|
||||
throw new ValidationException("Not null or not missed object is null at " + Lc.getCodePoint(null, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ package ru.touchin.templates.logansquare;
|
|||
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import ru.touchin.roboswag.core.log.Lc;
|
||||
import ru.touchin.templates.ApiModel;
|
||||
|
||||
/**
|
||||
|
|
@ -37,7 +38,7 @@ public abstract class LoganSquareJsonModel extends ApiModel {
|
|||
*/
|
||||
protected static void validateNotNull(@Nullable final Object object) throws ValidationException {
|
||||
if (object == null) {
|
||||
throw new ValidationException("Not nullable object is null or missed");
|
||||
throw new ValidationException("Not nullable object is null or missed at " + Lc.getCodePoint(null, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue