develooper Front page | perl.perl5.porters | Postings from August 2001

Re: Request for testing FAQs

Thread Previous | Thread Next
Philip Newton
August 23, 2001 22:05
Re: Request for testing FAQs
Message ID:
On Tue, 21 Aug 2001 17:56:22 -0400, (Michael G Schwern) wrote:

> =head2 How do I test that my code handles failure gracefully?

Related to this:

=head2 How can I simulate failures to make sure that my code does the Right
Thing in the face of them?

For example, how does one arrange for a database connection to be dropped
between $sth->prepare and $sth->execute, or between execute and fetch? Or for a
file to disappear between "-e ($file)" and "open FILE, $file"? Etc.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About