Skip to content

Commit f7311ba

Browse files
valfirstsdstoehr
authored andcommitted
Use IOException as parent for HarReaderException and HarWriterException
As `HarReaderException` and `HarWriterException` represent I/O errors, it makes sense to use `IOException` as a parent for them to simplify subsequent exception handling.
1 parent 6a1bc8f commit f7311ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/de/sstoehr/harreader/HarReaderException.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package de.sstoehr.harreader;
22

3-
public class HarReaderException extends Exception {
3+
import java.io.IOException;
4+
5+
public class HarReaderException extends IOException {
46

57
public HarReaderException(Throwable cause) {
68
super(cause);

src/main/java/de/sstoehr/harreader/HarWriterException.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package de.sstoehr.harreader;
22

3-
public class HarWriterException extends Exception {
3+
import java.io.IOException;
4+
5+
public class HarWriterException extends IOException {
46

57
public HarWriterException(Throwable cause) {
68
super(cause);

0 commit comments

Comments
 (0)