fix(sync): 优化错误信息打印

This commit is contained in:
v-zhangjc9
2024-03-27 09:09:36 +08:00
parent 11e2998a52
commit d84e223484
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ public class PulsarMessage2RecordFunction extends RichMapFunction<String, Record
if (StrUtil.isNotBlank(opTs) && OPTS_PATTERN.matcher(opTs).matches()) {
timestamp = LocalDateTime.parse(opTs, FORMATTER).toInstant(ZoneOffset.ofHours(8)).toEpochMilli();
} else {
throw new Exception("Opts is not match regex " + OPTS_PATTERN.pattern());
throw new Exception(StrUtil.format("Opts is not match regex {} value: {}", OPTS_PATTERN.pattern(), opTs));
}
} catch (Exception e) {
logger.error("Parse operation time error", e);

View File

@@ -155,7 +155,7 @@ public class PulsarMessageSourceReader extends RichParallelSourceFunction<String
}
}
} catch (Throwable t) {
logger.error("Read message failure, current value: " + currentValue, t);
throw new Exception("Read message failure, current value: " + currentValue, t);
}
}
}