Re: script failing at same line
| From: | Ben Dunlap | Date: | Wed, 09 Sep 2009 18:25:32 +0000 |
| Subject: | Re: script failing at same line | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297838@lists.php.net to get a copy of this message | ||
>
> My solution was to add a table to my database, and add an insert job id
> into the table after the line that is causing the problem. When I submit the
> script I use setTimeout to run an AJAX query of the table 5 seconds later.
> If the line has failed the job id will not be in the table and I alert the
> user. It works - and some day I hope to fix the software problem and make
> this unnecessary.
>
Thanks for the update -- that's about how I would have approached it too.
I wonder, in general, if fixing the underlying problem is even practical or
worth the investment of time. IIRC the problem was in third-party code --
and it seems to me that making your own code robust enough to handle
failures in third-party libraries (as you just did) is a really fruitful use
of your time; fixing the library itself, maybe not so much. I guess it
depends on how it all affects your end users.
Ben