Jump to content
UBot Underground

Error Handling: Check if connected successfully to mail server


Recommended Posts

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?
 

 

Link to post
Share on other sites

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.

  • Like 1
Link to post
Share on other sites
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.

Link to post
Share on other sites
  • 1 month later...
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...