Hi,
IfError doesn't work when using code like this:
IfError(Set(varID,Patch(...),Notify("Error"))
Any ideas?
Nelson
Thanks @CarlosFigueira . Makes perfect sense when you put it like that. Cheers.
No - when we save the result of the Patch in a variable using the Set function, we are handling the error ourselves (by storing it). So it will not bubble up to the App.OnError handler.
@CarlosFigueira in this case if the Patch throws an error will it be an unhandled error and be caught by App.OnError??
The Set function will not return an error. In a formula such as Set(var, expression), if expression is an error then the value of 'var' will be that error - Set did what it was supposed to do. For your scenario, you can have something like the following:
Set(varId, Patch(...));
IfError(varId, Notify($"Error: {FirstError.Message}"))
Hope this helps!
Stay up to date on forum activity by subscribing.
stampcoin
58
DS-11051211-0
20
MS.Ragavendar
9