Subject: | Error code is not 'reset' after a successful operation |
I'm using an API object instance to process several pages in a loop. I
have code to check for an error and exit the loop with a warning before
going on to the next iteration, however, I found that after one such
error, all subsequent operations were apparently failing.
This was due to the fact that once the first operation failed, the error
code got set correctly (which is how I tested for the error and quit the
loop). However, after successfully completing the next operation in the
next iteration, the error code was still set, causing my loop to crap
out at the first step on all subsequent iterations, even though the
operation was being completed successfully.
I fixed the problem by manually resetting the error code after a
failure, however, it would be nice if this happened automatically
internally after a success.