User Guide
Chapter 18: Building Custom CFAPI Tags 307
CCFXRequest::ReThrowException to provide protection against resource leaks in
extension code.
lpszError
Short identifier for error.
lpszDiagnostics
Error diagnostic information.
Example
The following example throws an exception indicating that an unexpected error
occurred while processing the request:
char buffError[512] ;
wsprintf( buffError,
"Unexpected Windows NT error number %ld "
"occurred while processing request.", GetLastError() ) ;
pRequest->ThrowException( "Error occurred", buffError ) ;
CCFXRequest::Write
void CCFXRequest::Write(LPCSTR
lpszOutput
)
Writes text output back to the user.
lpszOutput
Text to output.
Example
The following example creates a buffer to hold an output string, fills the buffer with
data, and then writes the output back to the user:
CHAR buffOutput[1024] ;
wsprintf( buffOutput, "The destination is: %s",
pRequest->GetAttribute("DESTINATION") ) ;
pRequest->Write( buffOutput ) ;
CCFXRequest::WriteDebug
void CCFXRequest::WriteDebug(LPCSTR
lpszOutput
)
Writes text output into the debug stream. This text is only displayed to the end-user if
the tag contains the
DEBUG attribute. (For more information, see
CCFXRequest::Debug.)
lpszOutput
Text to output.