Package net.officefloor.gef.editor
Interface AdaptedErrorHandler
-
- All Known Implementing Classes:
ViewersComposite
public interface AdaptedErrorHandler
Error handler that displays the error to the user.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AdaptedErrorHandler.MessageOnlyException
Message onlyException
.static interface
AdaptedErrorHandler.UncertainOperation
Function
interface for an uncertain operation that may fail.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isError(AdaptedErrorHandler.UncertainOperation operation)
void
showError(java.lang.String message)
Shows the error.void
showError(java.lang.Throwable error)
Shows the error.
-
-
-
Method Detail
-
showError
void showError(java.lang.String message)
Shows the error.- Parameters:
message
- Error message to show.
-
showError
void showError(java.lang.Throwable error)
Shows the error.- Parameters:
error
-Throwable
error to show.
-
isError
boolean isError(AdaptedErrorHandler.UncertainOperation operation)
Runs anAdaptedErrorHandler.UncertainOperation
.UncertainOperation operation = () -> { ... }; if (handler.isError(operation) { return; // failure in operation }
- Parameters:
operation
-AdaptedErrorHandler.UncertainOperation
.- Returns:
true
ifAdaptedErrorHandler.UncertainOperation
threw anException
. TheException
will displayed visually to the user.
-
-