void CCFXRequest::ThrowException(LPCSTRlpszError
, LPCSTRlpszDiagnostics
)
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 ) ;