home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////
- //
- // $$TAGNAME$$ - Cold Fusion custom tag
- //
- // Copyright $$YEAR$$. All Rights Reserved.
- //
-
-
- #include "stdafx.h" // Standard MFC libraries
- #include "cfx.h" // CFX Custom Tag API
-
-
- void ProcessTagRequest( CCFXRequest* pRequest )
- {
- try
- {
- // Retrieve attributes passed to the tag
- // For example:
- // LPCSTR lpszColor = pRequest->GetAttribute("COLOR") ;
-
-
-
- // Write output back to the user here...
- pRequest->Write( "Hello from $$TAGNAME$$!" ) ;
-
-
-
- // Output optional debug info
- if ( pRequest->Debug() )
- {
- pRequest->WriteDebug( "Debug info..." ) ;
- }
- }
-
- // Catch Cold Fusion exceptions & re-raise them
- catch( CCFXException* e )
- {
- pRequest->ReThrowException( e ) ;
- }
-
- // Catch ALL other exceptions and throw them as
- // Cold Fusion exceptions (DO NOT REMOVE! --
- // this prevents the server from crashing in
- // case of an unexpected exception)
- catch( ... )
- {
- pRequest->ThrowException(
- "Error occurred in tag $$TAGNAME$$",
- "Unexpected error occurred while processing tag." ) ;
- }
- }
-