Demo entry 3849653

cfc

   

Submitted by anonymous on Mar 03, 2016 at 03:34
Language: Coldfusion CFC. Code size: 879 Bytes.

thread
  	name = "email_#createUUID()#"
  	attributeCollection = structAvailableAsThreadAttributes,
  	action = "run"
  	priority="LOW" {

    try {

      	//API INTERACTION HERE
      	//items passed into the thread attributeCollection are available here, as "attribute.variableName"

    } catch (any e) {

      	writeLog( text="Type: #e.type# - Detail: #e.detail# - To: #attributes.eml# - Subject: #attributes.subject#", application="yes", file="cfthread", type="Error");

      	savecontent variable="errorDump" {
        	writeDump( var = e, format = 'text', label = 'CFCATCH Dump' );
        	writeDump( var = attributes, format = 'text', label = 'Attributes Dump' );
        	writeDump( var = variables, format = 'text', label = 'Variables Dump' );
      	}

      	//Perhaps email the errorDump or a write to a file or some other handling
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).