writedump

Description

A function equivalent to the <cfdump> tag which can be used in <cfscript>.

Categories

Related

Syntax

writedump (var, output, format, abort, label, metainfo, top, show, hide, keys, expand, showUDFs);
For positional notations, the sequence must be followed exactly in the same manner as provided in the syntax. If you do not provide one of the parameters, use an empty string instead. This does not apply to Boolean values for which you must provide proper values even if you have to skip them.

Usage

You can call this functions as name=value pair or as positional argument.

Example

<cfscript> 
filename = "log.txt"; 
    try { 
    result = FileOpen(expandpath(filename)); 
    WriteDump(result); 
} 
catch(Expression exception) { 
    WriteOutput("An Expression exception was thrown.</p>"); 
    WriteOutput("#exception.message#</p>"); 
    WriteLog(type="Error", file="myapp.log", text="[exception.type] 
    #exception.message#"); 
    } 
</cfscript>