Skip to content

Commit 87e991e

Browse files
authored
Merge pull request #1915 from cloudsufi/fileError
[PLUGIN-1848] File error message update
2 parents 7f24625 + 34f85c6 commit 87e991e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

core-plugins/src/main/java/io/cdap/plugin/batch/sink/FileSink.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ private Map<String, String> getFSProperties() {
107107
try {
108108
return GSON.fromJson(fileSystemProperties, MAP_TYPE);
109109
} catch (JsonSyntaxException e) {
110-
String errorMessage = String.format(
111-
"Failed to parse filesystem properties %s with message: %s: %s", fileSystemProperties,
112-
e.getClass().getName(), e.getMessage());
110+
String errorMessage = String.format("Failed to parse filesystem properties %s, %s: %s",
111+
fileSystemProperties, e.getClass().getName(), e.getMessage());
113112
throw ErrorUtils.getProgramFailureException(
114113
new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN), errorMessage, errorMessage,
115114
ErrorType.USER, false, e);

core-plugins/src/main/java/io/cdap/plugin/batch/source/FileSourceConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ Map<String, String> getFileSystemProperties() {
124124
try {
125125
return GSON.fromJson(fileSystemProperties, MAP_STRING_STRING_TYPE);
126126
} catch (Exception e) {
127-
throw new IllegalArgumentException(String.format("Unable to parse filesystem properties: %s", e.getMessage()), e);
127+
throw new IllegalArgumentException(
128+
String.format("Unable to parse filesystem properties, %s: %s", e.getClass().getName(),
129+
e.getMessage()), e);
128130
}
129131
}
130132

0 commit comments

Comments
 (0)