Link to home
Start Free TrialLog in
Avatar of hefterr
hefterrFlag for United States of America

asked on

Try/Catch in ColdFusion

Hi,
I'm a little new to Coldfusion so I could use a little help with catching errors.

I have a program the is invoked from an email link to activate an account.  It has a statement to decrypt a URL variable :

<CFSET account = decrypt(toString(toBinary(url.encrypted)),application.seed)>
<cfif account eq table.account>
  {do some updating}
</cfif

The problem is that if the user cuts/pastes only part of the encrypted URL, the CF decryption fails and goes to a general ColdFusion error screen.

I would like to catch this error and return my own page.

I've never worked with try/catch so could someone sketch the structure for me?

Thanks in advance,
hefterr
ASKER CERTIFIED SOLUTION
Avatar of Plucka
Plucka
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Coast Line
Coast Line
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial