ikebukuro 1 Posted August 27, 2013 Report Share Posted August 27, 2013 I've been playing with UBot for the last couple of weeks, and so far am very impressed with what can be done with it. But one thing which I am struggling with so far is error handling. In my previous automation program, most actions have exception handling built into them (failed to connect, file not found, etc.) which you can check for and have the bot act accordingly. I haven't been able to find something like this in UBot yet, so am wondering how you guys are dealing with error checking.For example, how would you check if you've failed to connect to a mail server?When connecting to the mail server fails, it pops up an error message which I don't see any way for the bot to work with. One option might be to be to turn errors off, and do something like add "create table from emails." Then when it fails to connect, I would get a table with 0 rows, 0 columns. But you'd get the same thing (0 rows, 0 columns) if you've successfully logged into an email account with an empty inbox. So this is not an indicator of a dead email account, wrong password, etc...It also seems not possible to place "connect to mail server" in an if statement to check for true/false.Does anyone have ideas on how to go about something like this? Quote Link to post Share on other sites
UBotDev 276 Posted August 27, 2013 Report Share Posted August 27, 2013 Error handling in UBot is implemented on developer side only, which means that in UBot Studio you get exception displayed in a popup, and you can stop the bot or continue execution, but in compiled bots that message will just be suppressed and bot will continue with execution. For now we have to rely on success, and check success instead of error. For your example, I would check if I get any emails, if there are 0 emails I would threat that as an error. I really think we would need some error/exception handling and I also suggested that in "feature requests" thread here on forum, but nothing has been said/done regarding that. Besides that I remember another thread was opened on that topic, so I don't think I'm the only one requesting that. I really hope this is something UBot team will look into in v5 release, since I think it's required to build better bots. 1 Quote Link to post Share on other sites
ikebukuro 1 Posted August 29, 2013 Author Report Share Posted August 29, 2013 I really hope this is something UBot team will look into in v5 release, since I think it's required to build better bots. ^ This x 10,000. It's a shame there's nothing like this built in already. Checking if an email server has connected is just one case out of many where I could see lack of error handling being a problem. As mentioned, creating a table from emails will give the same result for a live account with an empty inbox as it will for a dead account. Would be nice if they would add some form of error handling to commands which have timeouts. Something like ability set a variable in the event that one occurs. Quote Link to post Share on other sites
earthlingj 13 Posted October 2, 2013 Report Share Posted October 2, 2013 yes i agree 20000% that it needs to be able to return errors / success for smtp Quote Link to post Share on other sites
whoami 26 Posted December 1, 2015 Report Share Posted December 1, 2015 Anything was added for this?I need to know if an exception launched to log it. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.