294
Developing Web Applications with ColdFusion
CCFXException Class
Abstract class that represents an exception thrown during the processing of a
ColdFusion Extension (CFX) procedure.
Exceptions of this type can be thrown by
CCFXRequest Class
,
CCFXQuery Class
, and
CCFXStringSet Class
. Your ColdFusion Extension code must therefore be written to
handle exceptions of this type. (See the
CCFXRequest::ThrowException
and
CCFXRequest::ReThrowException
tags for details on doing this correctly.)
Class members
virtual LPCSTR GetError()
The
CCFXException::GetError
function returns a general error message.
virtual LPCSTR GetDiagnostic()
The
CCFXException::GetDiagnostics
function returns detailed error information.
CCFXException::GetError
This function provides basic user output for exception that occur during processing.
CCFXException::GetDiagnostics
This function provides detailed user output for exception that occur during
processing.
Example
This code block shows how both functions work with ThrowException and
ReThrowException.
// Write output back to the user here...
pRequest->Write( "Hello from CFX_FOO2!" ) ;
pRequest->ThrowException("User Error", "You goof’d...");
// Output optional debug info
if ( pRequest->Debug() )
{
pRequest->WriteDebug( "Debug info..." ) ;
}
}
// Catch Cold Fusion exceptions & re-raise them
catch( CCFXException* e )
{
// This is how you would pull the error information
LPCTSTR strError = e->GetError();
LPCTSTR strDiagnostic = e->GetDiagnostics();
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...