Contents > CFML Reference > ColdFusion C++ CFX Reference > CCFXRequest class > CCFXRequest::ThrowException PreviousNext

CCFXRequest::ThrowException

void CCFXRequest::ThrowException(LPCSTR lpszError, 
LPCSTR lpszDiagnostics)

Throws an exception and ends processing of a request. Call this function when you encounter an error that does not allow you to continue processing the request. This function is almost always combined with the CCFXRequest::ReThrowException to protect against resource leaks in extension code.

Parameter

Description

lpszError

Short identifier for error

lpszDiagnostics

Error diagnostic information

The following example throws an exception indicating that an unexpected error occurred while processing a request:

char buffError[512] ;
wsprintf( buffError,
"Unexpected Windows NT error number %ld "
"occurred while processing request.", GetLastError() ) ;
 
pRequest->ThrowException( "Error occurred", buffError ) ;

Contents > CFML Reference > ColdFusion C++ CFX Reference > CCFXRequest class > CCFXRequest::ThrowException PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.