Ok I see were you are going with it:-)
Yes I would consider it over kill, for starters how would
you know that the variable is not defined? I assume you are checking it some how
in a scope first...
Would it not be better to write a custom error handler that
caught the exception, and then just decided which way to go from there. I am
looking a processing time of checking a variable not defined, or maybe defined
and not used for each and every page request?
I have just finished working on an automation webservice
ticketing system, that not only caught the error (very easy no work needed
there) but decided to send an automated ticket back to the user (intranet
system) normal users don't see the ticket generated. So that the ticketing
system can then decide to assign it to who it needs to be assigned
to.
But it doesn't halt the application running, it only halts
that section nothing more you can do about that!
Regards
Andrew Scott
Technical
Consultant
NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne,
Victoria, 3205
Phone: 03 9686 0485 - Fax: 03 9699
7976
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Taco Fleur
Sent: Thursday, 1 July 2004 11:33 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Stupid idea?
Hi
Andrew,
not
sure what else I can say about it except try and explain it in another
way.
When
referencing variables on a page it could error for any reason, i.e. not defined,
not a simple type etc. etc. I was thinking about having a bit more control on
what happens when it errors. For example:
<cfset myIncorrectVar = "Dear Sir,">
<cfmail ...>
#variables.IncorrectVar#
Rest
of the important message
In
this case variables.IncorrectVar is undefined, I don't feel its important enough
to abort the process, so something like
#obj.fnOutput( variables, 'firstName', 'nothing'
)# or #obj.fnOutput( variables, 'firstName', 'display' )#
would suit me better... And I have not thought
this whole process out yet, so it will probably still turn out to be a bad idea,
but I am looking to hear about those bad
ideas.
And by the way, on a or
I would use one of those error codes to notify the
system/developer. etc.... ;-))
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
Register now for the 3rd National Conference on Tourism Futures, being held in Townsville, North Queensland 4-7 August - www.tq.com.au/tfconf |
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
