Ccfxrequest::setvariable; Ccfxrequest::throwexception - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

306
void ProcessTagRequest( CCFXRequest* pRequest )
{
}

CCFXRequest::SetVariable

void CCFXRequest::SetVariable(LPCSTR lpszName , LPCSTR lpszValue )
Sets a variable in the calling template. If the variable name specified already exists in
the template, its value is replaced. If it does not already exist, a new variable is created.
The values of variables created using
manner as other template variables (e.g., #MessageSent#).
lpszName
Name of variable.
lpszValue
Value of variable.
Example
The following example sets the value of a variable named
success of an operation performed by the custom tag:
BOOL bMessageSent ;
...attempt to send the message...
if ( bMessageSent == TRUE )
{
}
else
{
}

CCFXRequest::ThrowException

void CCFXRequest::ThrowException(LPCSTR lpszError ,
LPCSTR lpszDiagnostics )
Throws an exception and ends processing of this request. You should call this function
when you encounter an error that does not allow you to continue processing the
request. Note that this function is almost always combined with the
try
{
MYTAGDATA tagData ;
pRequest->SetCustomData( (LPVOID)&tagData ) ;
... remainder of procedure ...
pRequest->SetVariable( "MessageSent", "Yes" ) ;
pRequest->SetVariable( "MessageSent", "No" ) ;
Developing Web Applications with ColdFusion
can be accessed in the same
SetVariable
'MessageSent'
based on the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents