Error

Error

collectRequestInfo()

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

Arguments

create404Error()

Constructs a 404 error struct

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
messagestringNoPage does not exist

encodeErrorText()

Encodes/escapes text before output

Arguments

NameTypeRequiredDefaultOptionsDescription
textstringYes

formatError()

Formats normalized error for use in HTML or email

Arguments

NameTypeRequiredDefaultOptionsDescription
exceptionstructYes
formatstringNohtml[html | text | json]
bHighlightNonCorebooleanNotrueOnly applies to html and text formats

getStack()

Returns a stack array

Arguments

NameTypeRequiredDefaultOptionsDescription
bIncludeCorebooleanNotrue
bIncludeJavabooleanNotrue
ignoreLinesnumericNo1Number of stack lines to omit from result

logData()

Logs error to application and exception log files

Arguments

NameTypeRequiredDefaultOptionsDescription
logstructYes
bApplicationbooleanNotrue
bExceptionbooleanNotrue
logFilestringNo
logTypestringYeserror

normalizeError()

Simplifies and auguments error struct

Arguments

NameTypeRequiredDefaultOptionsDescription
exceptionanyYes
bIncludeCorebooleanNotrue

padResource()

Gets resource and pads it to required length

Arguments

NameTypeRequiredDefaultOptionsDescription
keystringYes
defaultstringNo#arguments.key#
substituteValuesstringNo#arrayNew(1)#
lengthstringNo0Required length
localestringNo

showErrorPage()

Returns output of projects error page

Arguments

NameTypeRequiredDefaultOptionsDescription
typestringYes404 | 500
stExceptionstructYes
abortbooleanNofalseSet 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

NameTypeRequiredDefaultOptionsDescription
messagestringNo
errorcodestringNo
detailstringNo
extendedinfostringNo
objectobjectNo
typestringNo
keystringNo
localestringNo
substituteValuesarrayNo#arrayNew(1)#