Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FailOnErr in events
#1
I'm cleaning up all my scheduled and triggered events.  Some of them are fairly long.  If one command fails, I want the event to keep going instead of stopping.

Does FailOnErr have any bearing on whether the entire event stops processing, or if it will keep going, based on true vs false?
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#2
The fail on error is related to the field reads and writes that take that value. You can use them in If statements if you want, and set false on error to False and they will just return a status instead of failing the action.

If you don't use it in an if statement and set it to False, then it will just silently fail and continue. For any reads of course you should use the If statement, since otherwise you'd be reacting to a bogus value that never got set.
Dean Roddey
Explorans limites defectum
Reply
#3
ok, so either way (true or false), if I don't use it on a FieldWrite command, the entire event should process even if one statement fails?
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#4
If you set FailOnError to False, then it will not cause an error and will just move to the next command in the action. So if you just want to continue no matter what and don't care whether it worked or not, just use the field write command normally (no If) and set FailOnError to False.

If you want to, you can also react to the field write working or not working, by using it in an If statement with FailOnError set to False. The action won't stop if the field write doesn't work. It will just return a False result to indicate it couldn't do the field write, and you can do something in response.
Dean Roddey
Explorans limites defectum
Reply
#5
ok got it. Will set all FailOnErr to false. The one i'm on is a "shut down house at midnight", I roll through all the lights, devices, etc to make sure everything got turned off. I don't want any given device in an error state to stop turning off the other devices.
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#6
(01-01-2018, 02:45 PM)Dean Roddey Wrote: If you want to, you can also react to the field write working or not working, by using it in an If statement with FailOnError set to False. The action won't stop if the field write doesn't work. It will just return a False result to indicate it couldn't do the field write, and you can do something in response.

I don't understand this.  What is the statement in the if statement?
Mykel Koblenz
Illawarra Smart Home
Reply
#7
The field write (or read). So

Code:
If Devices::FieldWrite(MyDrv.MyField, SomeValue, False)
Else
EndIf;

Since I passed False, it won't cause the action to fail, it will just return a False/True status. So I can use it in an If statement to do something if it worked, or didn't work.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Logic Server not sending triggered events znelbok 7 276 05-08-2019, 08:13 AM
Last Post: Dean Roddey
  Logic Server bad events rbroders 1 738 10-14-2018, 09:59 PM
Last Post: Dean Roddey
  Scheduled Events? jkmonroe 9 2,222 01-06-2018, 09:08 AM
Last Post: Dean Roddey
  Suggestion - Scheduled Events karenlee 2 1,500 05-10-2017, 05:37 PM
Last Post: Dean Roddey
  Pause All Scheduled Events? jkmonroe 8 2,817 09-29-2015, 03:51 PM
Last Post: Dean Roddey
  Triggered Events Quit Working kblagron 3 1,512 07-30-2015, 08:53 AM
Last Post: Dean Roddey
  Unhandled Exception Scheduled Events zra 8 2,610 06-25-2015, 05:54 PM
Last Post: zra
  Events from M1 questions znelbok 3 1,412 01-25-2015, 08:34 AM
Last Post: Dean Roddey
  Urgent: The Triggers tab does not show in the Manage Events console pseigler 6 2,288 11-12-2014, 07:02 AM
Last Post: pseigler
  How do you configure triggered events for elk outputs? kfly 14 3,959 10-29-2014, 06:13 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)