throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLELITERAL.addContent(value, expectedType));
}
}
private static UriSyntaxException convertEdmLiteralException(final EdmLiteralException e) {
final MessageReference messageReference = e.getMessageReference();
if (EdmLiteralException.LITERALFORMAT.equals(messageReference)) {
return new UriSyntaxException(UriSyntaxException.LITERALFORMAT.addContent(messageReference.getContent()), e);
} else if (EdmLiteralException.NOTEXT.equals(messageReference)) {
return new UriSyntaxException(UriSyntaxException.NOTEXT.addContent(messageReference.getContent()), e);
} else if (EdmLiteralException.UNKNOWNLITERAL.equals(messageReference)) {
return new UriSyntaxException(UriSyntaxException.UNKNOWNLITERAL.addContent(messageReference.getContent()), e);
} else {
return new UriSyntaxException(ODataBadRequestException.COMMON, e);
}
}