Skip to content

Commit 8d95885

Browse files
author
Chris Li
committed
Replace sneakythrows
1 parent e7ed9cd commit 8d95885

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cdi-core/src/main/java/com/linkedin/cdi/extractor/AvroExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public Schema getSchema() {
9797
try {
9898
avroSchema = fromJsonSchema(schemaArray);
9999
} catch (Exception e) {
100-
LOG.error("Error converting Json schema to Avro schema", e);
100+
throw new RuntimeException("Error converting Json schema to Avro schema", e);
101101
}
102102
} else {
103103
avroSchema = processInputStream(0) ? avroExtractorKeys.getAvroOutputSchema()
@@ -152,7 +152,7 @@ public GenericRecord readRecord(GenericRecord reuse) {
152152
try {
153153
row = avroSchemaBasedFilter.filter(row);
154154
} catch (Exception e) {
155-
LOG.error("Error filtering row", e);
155+
throw new RuntimeException("Error filtering row", e);
156156
}
157157
}
158158
return addDerivedFields(row);

cdi-core/src/main/java/com/linkedin/cdi/source/MultistageSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private Map<String, JsonArray> readSecondaryInputs(State state, final long retri
187187
try {
188188
TimeUnit.SECONDS.sleep(jobKeys.getRetryDelayInSec());
189189
} catch (Exception e) {
190-
LOG.info("Sleep() interrupted", e);
190+
throw new RuntimeException("Sleep() interrupted", e);
191191
}
192192
return readSecondaryInputs(state, retries - 1);
193193
}

0 commit comments

Comments
 (0)