diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/CloseException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/CloseException.java index a4731245..1778cf29 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/CloseException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/CloseException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class CloseException extends RuntimeException { +public class CloseException extends ExcelRuntimeException { public CloseException() { super(); diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/ExcelRuntimeException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/ExcelRuntimeException.java new file mode 100644 index 00000000..777d861b --- /dev/null +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/ExcelRuntimeException.java @@ -0,0 +1,23 @@ +package com.github.pjfanning.xlsx.exceptions; + +/** + * A parent class for all the excel-streaming-reader specific Runtime Exceptions. + */ +public class ExcelRuntimeException extends RuntimeException { + + protected ExcelRuntimeException() { + super(); + } + + protected ExcelRuntimeException(String msg) { + super(msg); + } + + protected ExcelRuntimeException(Exception e) { + super(e); + } + + protected ExcelRuntimeException(String msg, Exception e) { + super(msg, e); + } +} diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/MissingSheetException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/MissingSheetException.java index 48cd447a..840b9583 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/MissingSheetException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/MissingSheetException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class MissingSheetException extends RuntimeException { +public class MissingSheetException extends ExcelRuntimeException { public MissingSheetException() { super(); diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/NotSupportedException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/NotSupportedException.java index 1af50ada..5e041ba3 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/NotSupportedException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/NotSupportedException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class NotSupportedException extends RuntimeException { +public class NotSupportedException extends ExcelRuntimeException { public NotSupportedException() { super(); diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/OpenException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/OpenException.java index d59515d4..7a412692 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/OpenException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/OpenException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class OpenException extends RuntimeException { +public class OpenException extends ExcelRuntimeException { public OpenException() { super(); diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/ParseException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/ParseException.java index 50d68a17..39ee800c 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/ParseException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/ParseException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class ParseException extends RuntimeException { +public class ParseException extends ExcelRuntimeException { public ParseException() { super(); diff --git a/src/main/java/com/github/pjfanning/xlsx/exceptions/ReadException.java b/src/main/java/com/github/pjfanning/xlsx/exceptions/ReadException.java index 0a53cc2a..5ff14a72 100644 --- a/src/main/java/com/github/pjfanning/xlsx/exceptions/ReadException.java +++ b/src/main/java/com/github/pjfanning/xlsx/exceptions/ReadException.java @@ -1,6 +1,6 @@ package com.github.pjfanning.xlsx.exceptions; -public class ReadException extends RuntimeException { +public class ReadException extends ExcelRuntimeException { public ReadException() { super();