paul-rogers commented on a change in pull request #1500: DRILL-6820: Msgpack
format reader
URL: https://github.com/apache/drill/pull/1500#discussion_r230651829
##########
File path:
contrib/format-msgpack/src/main/java/org/apache/drill/exec/store/msgpack/MsgpackParsingException.java
##########
@@ -0,0 +1,20 @@
+package org.apache.drill.exec.store.msgpack;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+
+public class MsgpackParsingException extends DrillRuntimeException {
Review comment:
You should not really need this. Instead, use `UserError` to report errors.
You'll see it has lots of builder methods to report errors due to the user
(wrong config, say) or to external errors (corrupted file, say) or due to
internal errors (some invariant is broken indicating a possible bug.)
`UserError` has the mechanism to shut down the query and report a meaningful
message, along with context, back to the user. See [this
example](https://github.com/paul-rogers/drill/blob/5e5dc8652bac7750be075154488394cadc32341d/contrib/format-regex/src/main/java/org/apache/drill/exec/store/easy/regex/RegexRecordReader.java).
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services