Class ExceptionHandlingBasicsExamples
java.lang.Object
net.jrodolfo.java_evolution.java01.ExceptionHandlingBasicsExamples
Refreshes checked exceptions and basic exception wrapping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts a checked exception into a domain-specific unchecked exception.loadRequiredValue(boolean available) Declares a checked exception for callers to handle or propagate.
-
Constructor Details
-
ExceptionHandlingBasicsExamples
public ExceptionHandlingBasicsExamples()
-
-
Method Details
-
loadRequiredValue
Declares a checked exception for callers to handle or propagate.- Parameters:
available- whether the resource is available- Returns:
- loaded value
- Throws:
IOException- when the resource is unavailable
-
loadOrThrowDomainFailure
Converts a checked exception into a domain-specific unchecked exception.- Returns:
- loaded value
-