Package net.officefloor.gef.editor
Interface AdaptedErrorHandler
-
- All Known Implementing Classes:
ViewersComposite
public interface AdaptedErrorHandlerError handler that displays the error to the user.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAdaptedErrorHandler.MessageOnlyExceptionMessage onlyException.static interfaceAdaptedErrorHandler.UncertainOperationFunctioninterface for an uncertain operation that may fail.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisError(AdaptedErrorHandler.UncertainOperation operation)voidshowError(java.lang.String message)Shows the error.voidshowError(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-Throwableerror 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:
trueifAdaptedErrorHandler.UncertainOperationthrew anException. TheExceptionwill displayed visually to the user.
-
-