You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/01/25 01:07:28 UTC

[GitHub] [arrow] kou commented on a diff in pull request #33848: GH-33824: [C++] Amend exception msg in discovery.cc

kou commented on code in PR #33848:
URL: https://github.com/apache/arrow/pull/33848#discussion_r1086104224


##########
cpp/src/arrow/dataset/discovery.cc:
##########
@@ -244,7 +244,7 @@ Result<std::vector<std::shared_ptr<Schema>>> FileSystemDatasetFactory::InspectSc
     if (ARROW_PREDICT_FALSE(!result.ok())) {
       return result.status().WithMessage(
           "Error creating dataset. Could not read schema from '", info.path(),
-          "': ", result.status().message(), ". Is this a '", format_->type_name(),
+          "': ", result.status().message(), " Is this a '", format_->type_name(),

Review Comment:
   How about changing order instead of using `()`?
   
   ```diff
   diff --git a/cpp/src/arrow/dataset/discovery.cc b/cpp/src/arrow/dataset/discovery.cc
   index a38ec00bb9..2aca85e6ad 100644
   --- a/cpp/src/arrow/dataset/discovery.cc
   +++ b/cpp/src/arrow/dataset/discovery.cc
   @@ -244,8 +244,7 @@ Result<std::vector<std::shared_ptr<Schema>>> FileSystemDatasetFactory::InspectSc
        if (ARROW_PREDICT_FALSE(!result.ok())) {
          return result.status().WithMessage(
              "Error creating dataset. Could not read schema from '", info.path(),
   -          "': ", result.status().message(), ". Is this a '", format_->type_name(),
   -          "' file?");
   +          "'. Is this a '", format_->type_name(), "' file?: ", result.status().message());
        }
        schemas.push_back(result.MoveValueUnsafe());
      }
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org