pitrou commented on a change in pull request #10988:
URL: https://github.com/apache/arrow/pull/10988#discussion_r699116150



##########
File path: cpp/src/arrow/pretty_print.cc
##########
@@ -421,10 +471,14 @@ class ArrayPrinter : public PrettyPrinter {
  private:
   template <typename Unit>
   void FormatDateTime(const char* fmt, int64_t value, bool add_epoch) {
-    if (add_epoch) {
-      (*sink_) << arrow_vendored::date::format(fmt, epoch_ + Unit{value});
-    } else {
-      (*sink_) << arrow_vendored::date::format(fmt, Unit{value});
+    try {
+      if (add_epoch) {
+        (*sink_) << arrow_vendored::date::format(fmt, epoch_ + Unit{value});

Review comment:
       Ok, it works by templating a bit differently.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to