RE: Custom error (cfthrow) question

2002-02-28 Thread Christopher Olive
when you trap an error of type database, you're provided with SQLState and NativeErrorCode. examine these with your CATCH, then do what you like with the user. christopher olive, cto, vp of web development, vp it security atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com

Re: Custom error (cfthrow) question

2002-02-28 Thread Brook Davies
We do something like this, but instead of notifying the user, we update the field size and re-attempt the insert Note: This under controlled circumstances and is not done in an Adhoc, lets just make it bigger fashion Just look in your log (or a SQL book) to find the error codes and add

RE: Custom error (cfthrow) question

2002-02-28 Thread Fred Jambukeswaran
Lets say you wanted to throw a fieldmissing error use cfthrow like: cfthrow type=fieldmissing message=hey buddy fill in all the fields detail=missing field: first_name Then you can catch it along with your database error as follows: cftry !--- code here --- cfcatch

RE: Custom error (cfthrow) question

2002-02-28 Thread Owens, Howard
Thanks all for the help! H. -Original Message- From: Christopher Olive [SMTP:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 12:18 PM To: CF-Talk Subject: RE: Custom error (cfthrow) question when you trap an error of type database, you're provided with SQLState

RE: Custom error (cfthrow) question

2002-02-28 Thread Owens, Howard
: * TYPE -Original Message- From: Fred Jambukeswaran [SMTP:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 12:19 PM To: CF-Talk Subject: RE: Custom error (cfthrow) question Lets say you wanted to throw a fieldmissing error use cfthrow like: cfthrow type

RE: Custom error (cfthrow) question

2002-02-28 Thread Christopher Olive
http://www.atnetsolutions.com -Original Message- From: Owens, Howard [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 5:00 PM To: CF-Talk Subject: RE: Custom error (cfthrow) question I tried the nativeerrorcode attribute and I get this error (on a 5.0 server): Just in time

RE: Custom error (cfthrow) question

2002-02-28 Thread Dave Watts
I tried the nativeerrorcode attribute and I get this error (on a 50 server): Just in time compilation error An unknown attribute 'NATIVEERRORCODE' has been encountered If you're using ODBC, you'll want to reference CFCATCHSQLState CFCATCHNativeErrorCode is for native drivers, I think

RE: Custom error (cfthrow) question

2002-02-28 Thread Shawn Grover
specifically for database types of errors. Hope that helps. Shawn Grover -Original Message- From: Owens, Howard [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 3:00 PM To: CF-Talk Subject: RE: Custom error (cfthrow) question I tried the nativeerrorcode attribute and I get