Writedump

Description

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

Parameters

Same as <cfdump> tag.

Function syntax

writedump (var, expand, format, hide, keys, label, metainfo, output, show, showUDFs, top);

For positional notations, the sequence is as follows:

writedump (var, expand, format, hide, keys, label, metainfo, output, show, showUDFs, top)

See also

cfdump, cfscript

Usage

You can call this functions as name=value pair or as positional argument. For positional arguments, the order of the parameters remains the same as the corresponding tag or as mentioned in the preceding Function Syntax section.

Example

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