My solution (much to the disgust of Onnis) was to just go ahead and do
the <cffile..> anyway.

Put it inside a CFTRY... if it bombs, you know there's no file.

Dodgy, but it works... :)


IMHO its not dodgy at all. That's the whole point of excetions. To
handle exceptional circumstances.

You shouldn't use exceptions to replace flow control, it is very
difficult to read.
Eg:  looping over an array and letting the array out of bounds exception
terminate the loop. The end of an array is not exceptional, it happens
with every array. You can do nasty things like that all the time, its
just not kosher.

However, if you are expecting to receive a file upload, not all file
uploads have invalid filenames, so using an exception to detect it is
perfectly allright.

There are no hard and fast rules for using exceptions. The idea is that
they should improve the readability of your code by moving error
handling out of the main body of the code.

Jon.


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to