onError method
Implementation
KResult<T> onError(void Function(String message, [StackTrace? st]) handler) {
if (isError) handler(message, stackTrace);
return this;
}
KResult<T> onError(void Function(String message, [StackTrace? st]) handler) {
if (isError) handler(message, stackTrace);
return this;
}