At what level, then, should your code check for the database error?
Should it be within the actual method that performs the database call;
should it be in the code that calls the method?

What is your plan?

Thanks
M!ke 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Phil Cruz
Sent: Thursday, November 04, 2004 10:49 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Validation

Thanks for helping me fully understand why you need the db constraint ;)

My last point though is that if you have the constraint you still need
to have code to catch the exception and display the appropriate message
to the user.  With your implementation, the exception would be thrown
but presumably caught with a generic error handler that displays "sorry,
an unknown error has occured".

So the point is don't think your code doesn't depend on it, rather
*know* that it does and plan to handle the exception accordingly.

Thanks,
Phil

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to