Hello,

I've been having problems getting exceptions from a C++ CFX tag to be
passes to CF. The problem shows up under Linux - SuSE 7.1 and RedHat 7.0
with cfserver 4.5.1. Under 4.5.1, sp 2, the tag doesn't execute at all. It
doesn't compile at all under RedHat 6.1 (officially supported) due to a
g++ internal error from a xalan .h file.

The basic structure of my shared object (containing ProcessTagRequest) is:

ProcessTagRequest:
 try {
   get the attributes from the tag
   call "perform translation" function 
   set a CF variable according to results of perform translation
 }
 catch( <XML exception> ) { ... }
 catch( <XSL exception> ) { ... }
 catch( ... ) { ... }
 // all catch blocks throw/rethrow an exception to CF using
CCFXRequest::(Re)ThrowException if the request is non-null (see below).


"perform translation":
  
  - This function takes in an XML and XSL URI, transforms the XML
    according to the rules in the XSL doc, and returns the results through
    a parameter. The implementation is throught xalan/xerces.


The tag works correctly when the URIs are valid. When one is invalid,
however, the XLS (xalan) processor throws an exception that isn't caught
by cfserver. I've made a C++ wrapper program that calls the
ProcessTagRequest function with a null CCFXRequest* (the ProcessTagRequest
function sets the internal URIs to invalid vals in case its CCFXRequest*
arg is null, and handles the null ptr correctly). When the wrapper program
is run from the shell, ProcessTagRequest catches the exception. When
ProcessTagRequest is run from CF, the function appears to stop execution
immediately -- it doesn't even go up the stack to find where/if the
exception is caught.

My shared object links against xalan c 1.1 (and implicitely xerces c 1.4).
I've run it under CF sp 2, which comes with xerces 1.2. Using backtraces,
I found that the xerces 1.4 and 1.2 calls are interleaved under sp 2 --
very strange... So, I'm sticking with the original for now.

Any help you might be able to offer would be most appreciated!

Thank you,
Matt Leinhos



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to