onFailure
open fun onFailure(name: ConfigurationPropertyName, target: Bindable<out Any>, context: BindContext, error: Exception): Any
Called when binding fails for any reason (including failures from onSuccess or onCreate calls). Implementations may choose to swallow exceptions and return an alternative result.
Return
the actual result that should be used (may be null
).
Parameters
name
the name of the element being bound
target
the item being bound
context
the bind context
error
the cause of the error (if the exception stands it may be re-thrown)
Throws
if the binding isn't valid