error handling

If you need help on how to use the program
Post Reply
J
Posts: 224
Joined: 2008-02-17 17:09:26

error handling

Post 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.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post 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.
J
Posts: 224
Joined: 2008-02-17 17:09:26

Post by J »

Ah, very good.
Thank you & happy new year.

J.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post by soulsnake »

Happy new year too.

Soulsnake.
Post Reply