@Retention(value=CLASS)
public @interface OnError
ComponentUtils.raise
.
The method will receive a ComponentContext, and an Exception
.
An example use may look like this:
@OnError
static Component onError(
ComponentContext c,
Exception e,
@Prop SomeProp prop) {
MyComponent.updateErrorAsync(c, String.format("Error for %s: %s", prop, e.getMessage()));
}