Skip to content

Commit cff348f

Browse files
Merge branch '0.6.x' into master
2 parents 22cfe0e + c276614 commit cff348f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/io/confluent/kafka/connect/datagen/ConfigUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
import java.io.FileNotFoundException;
2121
import java.io.IOException;
2222
import java.io.InputStream;
23+
import org.apache.avro.AvroRuntimeException;
2324
import org.apache.avro.Schema;
2425
import org.apache.avro.Schema.Parser;
25-
import org.apache.avro.SchemaParseException;
2626
import org.apache.kafka.common.config.ConfigException;
2727
import org.slf4j.Logger;
2828
import org.slf4j.LoggerFactory;
@@ -35,7 +35,7 @@ public static Schema getSchemaFromSchemaString(String schemaString) {
3535
Schema schema;
3636
try {
3737
schema = schemaParser.parse(schemaString);
38-
} catch (SchemaParseException e) {
38+
} catch (AvroRuntimeException e) {
3939
log.error("Unable to parse the provided schema", e);
4040
throw new ConfigException("Unable to parse the provided schema");
4141
}
@@ -56,11 +56,11 @@ public static Schema getSchemaFromSchemaFileName(String schemaFileName) {
5656
schema = schemaParser.parse(
5757
DatagenTask.class.getClassLoader().getResourceAsStream(schemaFileName)
5858
);
59-
} catch (SchemaParseException | IOException i) {
59+
} catch (AvroRuntimeException | IOException i) {
6060
log.error("Unable to parse the provided schema", i);
6161
throw new ConfigException("Unable to parse the provided schema");
6262
}
63-
} catch (SchemaParseException | IOException e) {
63+
} catch (AvroRuntimeException | IOException e) {
6464
log.error("Unable to parse the provided schema", e);
6565
throw new ConfigException("Unable to parse the provided schema");
6666
}

0 commit comments

Comments
 (0)