1
|
|
package pro.verron.officestamper.api; |
2
|
|
|
3
|
|
import org.springframework.util.function.ThrowingFunction; |
4
|
|
|
5
|
|
import java.util.function.Function; |
6
|
|
import java.util.function.Supplier; |
7
|
|
|
8
|
|
/// OfficeStamperException is a subclass of RuntimeException that represents an exception that can be thrown during the |
9
|
|
/// processing of an Office document using the OfficeStamper library. |
10
|
|
/// It provides additional constructors to handle different scenarios. |
11
|
|
public class OfficeStamperException |
12
|
|
extends RuntimeException { |
13
|
|
/// OfficeStamperException is a subclass of RuntimeException that represents an exception that can be thrown |
14
|
|
/// during the processing of an Office document using the OfficeStamper |
15
|
|
/// library. |
16
|
|
/// |
17
|
|
/// @param message a message describing the error |
18
|
|
public OfficeStamperException(String message) { |
19
|
|
super(message); |
20
|
|
} |
21
|
|
|
22
|
|
/// OfficeStamperException is a subclass of RuntimeException that represents an exception that can be thrown |
23
|
|
/// during the processing of an Office document using the OfficeStamper |
24
|
|
/// library. |
25
|
|
/// |
26
|
|
/// @param cause the cause of the exception |
27
|
|
public OfficeStamperException(Throwable cause) { |
28
|
|
super(cause); |
29
|
|
} |
30
|
|
|
31
|
|
/// OfficeStamperException is a subclass of RuntimeException that represents an exception that can be thrown |
32
|
|
/// during the processing of an Office document using the OfficeStamper |
33
|
|
/// library. |
34
|
|
/// |
35
|
|
/// @param message a message describing the error |
36
|
|
/// @param cause the cause of the exception |
37
|
|
public OfficeStamperException(String message, Throwable cause) { |
38
|
|
super(message, cause); |
39
|
|
} |
40
|
|
|
41
|
|
/// OfficeStamperException is a subclass of RuntimeException |
42
|
|
/// that represents an exception |
43
|
|
/// that can be thrown during the processing of an Office document using the OfficeStamper |
44
|
|
/// library. |
45
|
|
public OfficeStamperException() { |
46
|
|
super("Unexpected exception"); |
47
|
|
} |
48
|
|
|
49
|
|
/// Creates a supplier that returns a new instance of [OfficeStamperException] with the specified message. |
50
|
|
/// |
51
|
|
/// @param message the message describing the exception |
52
|
|
/// @return a supplier that provides a new [OfficeStamperException] instance |
53
|
|
public static Supplier<OfficeStamperException> throwing(String message) { |
54
|
2
1. lambda$throwing$0 : replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::lambda$throwing$0 → NO_COVERAGE
2. throwing : replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::throwing → SURVIVED
|
return () -> new OfficeStamperException(message); |
55
|
|
} |
56
|
|
|
57
|
|
/// Wraps a ThrowingFunction into a standard Java Function, converting any checked exceptions |
58
|
|
/// thrown by the original function into an OfficeStamperException. |
59
|
|
/// |
60
|
|
/// @param <T> the type of the input to the function |
61
|
|
/// @param <U> the type of the result of the function |
62
|
|
/// @param function the throwing function to be wrapped |
63
|
|
/// @return a Function that wraps the specified ThrowingFunction and handles exceptions by |
64
|
|
/// throwing an OfficeStamperException |
65
|
|
public static <T, U> Function<T, U> throwing(ThrowingFunction<T, U> function) { |
66
|
1
1. throwing : replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::throwing → KILLED
|
return ThrowingFunction.of(function, OfficeStamperException::new); |
67
|
|
} |
68
|
|
} |
| | Mutations |
54 |
|
1.1 Location : lambda$throwing$0 Killed by : none replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::lambda$throwing$0 → NO_COVERAGE
2.2 Location : throwing Killed by : none replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::throwing → SURVIVED
Covering tests
Covered by tests:
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableRowsTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableRowsTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableBug32Test(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableBug32Test(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.StampTableTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.StampTableTest]/[test-template:stampTableTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.StampTableTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.StampTableTest]/[test-template:stampTableTest(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#3]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#6]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#5]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[method:shouldAcceptSet()]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[method:shouldAcceptList()]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[method:shouldAcceptSet()]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[method:shouldAcceptList()]
- pro.verron.officestamper.test.ProcessorRepeatTableRowTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatTableRowTest]/[method:shouldAcceptQueue()]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[method:shouldAcceptQueue()]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#3]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#6]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#5]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
- pro.verron.officestamper.test.ProcessorRepeatParagraphTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatParagraphTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#33]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#15]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfEndnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfFootnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.MultiStampTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.MultiStampTest]/[test-template:repeatDocPart(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfEndnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.MultiStampTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.MultiStampTest]/[test-template:repeatDocPart(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorRepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#13]
- pro.verron.officestamper.test.ProcessorRepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#5]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfFootnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfHomer(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfHomer(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.GoogleDocsSupportTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.GoogleDocsSupportTest]/[method:conditionalRepeatedParagraphs_createdByGoogleDocs()]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfAbsentValue(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfAbsentValue(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfBart(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfBart(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:interfaces(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:interfaces(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.ProcessorRepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#12]
- pro.verron.officestamper.test.ProcessorRepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorRepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
|
66 |
|
1.1 Location : throwing Killed by : pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[method:test64()] replaced return value with null for pro/verron/officestamper/api/OfficeStamperException::throwing → KILLED
|