Hi to everyone, another simple question:
I made an "URL Download" action in a do cicle, and I must stop the cicle when
the "URL Download" action goes to an error condition (for example, the file to download don't exist).
How can I intercept the error condition (in my case, if the file to download don't exist, and then stop the flow) ?
Thank you in advice!
How may I manage the "error" condition on a "URL Download" ?
Moderator: Martin
Re: How may I manage the "error" condition on a "URL Downloa
Add the connection first and change the connection to exception, as shown here : viewtopic.php?f=5&t=7314#p20955
You might want to catch the error by using action Notification on Statusbar and put the error there.
You might want to catch the error by using action Notification on Statusbar and put the error there.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: How may I manage the "error" condition on a "URL Downloa
Thank you for the answer, I made it in a very simple way:
1) create a standard connection to the download action back to the previous cicle step, wich increments a variable and then perform the download action again
2) create an exception connection from the same download action to another action " stop flow"
so the download action continues with every new element and the first time an element miss, and the download action perform an error, the exception connection
drives to the "stop the flow" action.
It seems working, thanks a lot!
1) create a standard connection to the download action back to the previous cicle step, wich increments a variable and then perform the download action again
2) create an exception connection from the same download action to another action " stop flow"
so the download action continues with every new element and the first time an element miss, and the download action perform an error, the exception connection
drives to the "stop the flow" action.
It seems working, thanks a lot!
Re: How may I manage the "error" condition on a "URL Downloa
I confirm that this way it works,
but if I add another step (a simple script b=b+1 for ex.) after the "exception" connection,
and then an expression to check "b", it gives me an error :
" End executing condition 'Expression: b=3' with return value false and exception Could not convert value '3' to boolean "
this means that (as I suppose) I've not well understood the meaning of the "exception" connection.
but if I add another step (a simple script b=b+1 for ex.) after the "exception" connection,
and then an expression to check "b", it gives me an error :
" End executing condition 'Expression: b=3' with return value false and exception Could not convert value '3' to boolean "
this means that (as I suppose) I've not well understood the meaning of the "exception" connection.
Re: How may I manage the "error" condition on a "URL Downloa
Comparing values in a script requires two equal signs, otherwise it's an assignment. Changing the script to b==3 should work.
Regards,
Martin
Regards,
Martin
Re: How may I manage the "error" condition on a "URL Downloa
Oh , thank you!
(It works!)
(It works!)