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