I use NewRelic
error capture for my application coldbox
. From the method, OnException
I just send a struct error to register the error.
My code is in onexception method
public function onException(event,rc,prc){
NewRelic.logError( prc.exception.getExceptionStruct());
}
The logerror () method is located in NewRelic.cfc and contains the following code
public boolean function logError(
required struct exception
) {
var cause = arguments.exception;
var params = {
error_id = createUUID(),
type: arguments.exception.type,
message: arguments.exception.message
};
writeDump(this.newRelic);
this.newRelic.noticeError(cause, params);abort;
return true;
}
So, during the error, I get the following error.
The noticeError method was not found.

You can see that there is a method in the object noticeError()
, but it is overloaded with arguments.
I use the same code to capture NewRelic errors in another coldfusion project without any frameworks.
A call error.cfm
through a tag Cferror
and code in error.cfm as follows
<cfset Application.newRelic.logError( variables.error )>
NewRelic.cfc logerror()
, . NewRelic - .
, NewRelic.
noticeError (java.lang.Throwable, java.util.Map)
Cause
logError() NewRelic.cfc, .
writeDump(cause.getClass().getName());
coldfusion.runtime.ExceptionScope
Coldbox
coldfusion.runtime.UndefinedVariableException
Cause
coldbox. , coldbox? noticeError method was not found
.