Page 1 of 1

error handling

Posted: 2013-12-28 10:59:21
by J
hi,

working with my script in batch mode, I sometimes got different errors which stopped the script until I pressed the OK button.

- server error - HTTP error 500
- internal error 336 - read timeout
- internal socket error 10060 - connection timeout.

I´ve seen there is a new function RaiseConnectionError which turns on/off the error display. Due to the fact, that I have no clue how to simulate these errors for testing, there are a couple of questions I still need an answer for.

- Do I use the function RaiseConnectionError(False) once at the beginning of the script?
- Does the function turn off/hide all these error messages?
- Is the script then going on with next movie/picture/script line?
- Can I write the error message into a variable and show a "log window" or write it into a "log file" at the end of batch processing?
- Is there a kind of "on error do ..."?

thanks
J.

Posted: 2013-12-29 10:02:42
by soulsnake
Hi J,
- Do I use the function RaiseConnectionError(False) once at the beginning of the script?
Yes, but you can use it many times, it is like a button on/off.
- Does the function turn off/hide all these error messages?
Yes, it does for all this functions:
- GetPage/GetPage2: return empty string if an error occurs.
- PostPage/PostPage2: return empty string if an error occurs.
- GetPicture/GetPicture2/GetExtraPicture/GetExtraPicture2: return false if an error occurs.
- Is the script then going on with next movie/picture/script line?
Yes and you can check the resut of function to know if an error occurs (but you can not know which kind of errors is).
- Can I write the error message into a variable and show a "log window" or write it into a "log file" at the end of batch processing?
Yes if you check result of function but you can not know which kind of errors is.
- Is there a kind of "on error do ..."?
No.

Soulsnake.

Posted: 2013-12-29 10:49:40
by J
Ah, very good.
Thank you & happy new year.

J.

Posted: 2013-12-29 10:54:08
by soulsnake
Happy new year too.

Soulsnake.