If a new ERROR type is introduced between above two ones, it should be
obligatorily reflected here
What about:
```
UserException.Builder builder;
if (type == ERROR_TYPE_DATA_READ) {
builder = UserException.dataReadError(cause);
} else if (type == ERROR_TYPE_INTERNAL) {
builder = UserException.internalError(cause);
} else {
throw new IllegalArgumentException("Unknown error type: " + type);
}
return builder;
```
[ Full content available at: https://github.com/apache/drill/pull/1455 ]
This message was relayed via gitbox.apache.org for [email protected]