Re: Writing double-prime to file? [message #184785 is a reply to message #184784] |
Sat, 01 February 2014 16:46 |
Doug Miller
Messages: 171 Registered: August 2011
Karma:
|
Senior Member |
|
|
adrian(at)poppyrecords(dot)invalid(dot)invalid (Adrian Tuddenham) wrote in
news:1lgecvh.x0bk6rlzuxueN%adrian(at)poppyrecords(dot)invalid(dot)invalid:
> Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:
>> BTW - you should NEVER use die() in production code. It terminates
>> processing of EVERYTHING (including the HTML) immediately, resulting in
>> invalid HTML being sent to the browser. Rather, you should test for
>> failure, and if it fails, just not execute the code dependent on the
>> operation working (and put out a failure message instead, if you wish).
>
> What is the code for the alternative to "die"?
>
The alternative is exactly as described: write whatever code you need to write to handle the
error gracefully, instead of simply terminating processing (which is what die() does).
Of course since, as you go on to say, you are the only user of this code, it doesn't much matter.
|
|
|