You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ja...@apache.org on 2024/11/13 11:15:35 UTC

(tsfile) 01/02: Print file name in error msg

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch iotdb
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 892fb5807d7102b0e26622d1c01a6611e82e3c7a
Author: Jackie Tien <ja...@gmail.com>
AuthorDate: Wed Nov 13 19:12:11 2024 +0800

    Print file name in error msg
---
 .../src/main/java/org/apache/tsfile/read/TsFileSequenceReader.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/java/tsfile/src/main/java/org/apache/tsfile/read/TsFileSequenceReader.java b/java/tsfile/src/main/java/org/apache/tsfile/read/TsFileSequenceReader.java
index 06ec5466..d7a9f0ba 100644
--- a/java/tsfile/src/main/java/org/apache/tsfile/read/TsFileSequenceReader.java
+++ b/java/tsfile/src/main/java/org/apache/tsfile/read/TsFileSequenceReader.java
@@ -520,7 +520,7 @@ public class TsFileSequenceReader implements AutoCloseable {
       if (ignoreNotExistDevice) {
         return null;
       }
-      throw new IOException("Device {" + device + "} is not in tsFileMetaData");
+      throw new IOException("Device {" + device + "} is not in tsFileMetaData of " + file);
     }
     ByteBuffer buffer =
         readData(metadataIndexPair.left.getOffset(), metadataIndexPair.right, ioSizeConsumer);
@@ -589,7 +589,8 @@ public class TsFileSequenceReader implements AutoCloseable {
       if (ignoreNotExistDevice) {
         return null;
       }
-      throw new IOException("Device {" + path.getDeviceString() + "} is not in tsFileMetaData");
+      throw new IOException(
+          "Device {" + path.getDeviceString() + "} is not in tsFileMetaData of " + file);
     }
     ByteBuffer buffer = readData(metadataIndexPair.left.getOffset(), metadataIndexPair.right);
     MetadataIndexNode metadataIndexNode;
@@ -658,7 +659,7 @@ public class TsFileSequenceReader implements AutoCloseable {
       if (ignoreNotExistDevice) {
         return Collections.emptyList();
       }
-      throw new IOException("Device {" + device + "} is not in tsFileMetaData");
+      throw new IOException("Device {" + device + "} is not in tsFileMetaData of " + file);
     }
     List<TimeseriesMetadata> timeseriesMetadataList = new ArrayList<>();