vdiravka commented on a change in pull request #1455: DRILL-6724: Convert IndexOutOfBounds
exception to UserException with …
URL: https://github.com/apache/drill/pull/1455#discussion_r214674475
##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/bson/BsonRecordReader.java
##########
@@ -364,13 +367,14 @@ public void ensureAtLeastOneField(ComplexWriter writer) {
}
}
- public UserException.Builder getExceptionWithContext(UserException.Builder exceptionBuilder,
String field,
- String msg, Object... args) {
- return null;
- }
-
- public UserException.Builder getExceptionWithContext(Throwable exception, String field,
String msg, Object... args) {
- return null;
+ public UserException.Builder createExceptionWithContext(Throwable cause, String message)
{
+ UserException.Builder builder = UserException.dataReadError(cause)
+ .message(message);
+ if (reader != null) {
+ builder.addContext("Name", reader.getCurrentName())
Review comment:
`addContext` from new line will look better
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
|