error

error

error

Error functions

Metadata

collectRequestInfo()

Returns a struct containing information that should be included in every error report

Arguments

Name Type Required Default Options Description
None

create404Error()

Constructs a 404 error struct

Arguments

Name Type Required Default Options Description
message string No Page does not exist

formatError()

Formats normalized error for use in HTML or email

Arguments

Name Type Required Default Options Description
exception struct Yes
format string No html [html | text | json]
bHighlightNonCore boolean No true Only applies to html and text formats

getStack()

Returns a stack array

Arguments

Name Type Required Default Options Description
bIncludeCore boolean No true
bIncludeJava boolean No true
ignoreLines numeric No 0 Number of stack lines to omit from result

logData()

Logs error to application and exception log files

Arguments

Name Type Required Default Options Description
log struct Yes
bApplication boolean No true
bException boolean No true

normalizeError()

Simplifies and auguments error struct

Arguments

Name Type Required Default Options Description
exception any Yes
bIncludeCore boolean No true

padResource()

Gets resource and pads it to required length

Arguments

Name Type Required Default Options Description
key string Yes
default string No [runtime expression]
substituteValues String No [runtime expression]
length String No 0 Required length
locale string No

showErrorPage()

Returns output of projects error page

Arguments

Name Type Required Default Options Description
type string Yes 404 | 500
stException struct Yes
abort boolean No false Set to true to force the request to stop processing

throw()

Provides similar functionality to the cfthrow tag but is automatically incorporated to use the resource bundles.

Arguments

Name Type Required Default Options Description
message string No
errorcode string No
detail string No
extendedinfo string No
object object No
type string No
key string No
locale string No
substituteValues array No [runtime expression]