ExceptionBean is undefined in the request collection (private=false)

Hi

I want to create my custom Exception Handler. I created the following way;

//Grab Exception From request collection, placed by ColdBox var exceptionBean = event.getValue("ExceptionBean"); //Place exception handler below: switch ( exceptionBean.getType() ){ case "Framework.plugins.settings.EventHandlerNotRegisteredException": getPlugin("messagebox").setMessage("warning","Aradığınız sayfa bulunamadı."); setNextEvent(); break;

default:
//Manually log the errors using the logger plugin.
getPlugin(“logger”).logErrorWithBean(ExceptionBean);

}
//What else, in this case, nothing, the framework will show the exception templa

But not working, I get the following errors;

Application Execution ExceptionError Type: RequestContext.ValueNotFound : [N/A]

Error Messages: The variable: ExceptionBean is undefined in the request collection (private=false)
Keys Found: NEWS,REASON1,REASON2,REASON3,event,fwreinit,BANNERS,REASON5,REASON4,lang,TITLE

Tag Context:
ID: CFTHROW
LINE: 776
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\web\context\RequestContext.cfc
ID: CF_UDFMETHOD
LINE: 137
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\web\context\RequestContext.cfc
ID: CF_TEMPLATEPROXY
LINE: 1
Template: C:\inetpub\wwwroot\odammobilya\views\home.cfm
ID: CFINCLUDE
LINE: 271
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\plugins\Renderer.cfc
ID: CF_UDFMETHOD
LINE: 159
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\plugins\Renderer.cfc
ID: CF_UDFMETHOD
LINE: 85
Template: C:\inetpub\wwwroot\odammobilya\layouts\Layout.Main.cfm
ID: CFINCLUDE
LINE: 384
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\plugins\Renderer.cfc
ID: CF_TEMPLATEPROXY
LINE: 261
Template: C:\inetpub\wwwroot\coldbox_standalone_3.1.0\system\Coldbox.cfc
ID: CF_UDFMETHOD
LINE: 52
Template: C:\inetpub\wwwroot\odammobilya\Application.cfc

Please help me.

Are you trying to run that event directly? The framework has to call it for you. Is it set up in the config?

~Brad

What do I need a setting in the config file ?

When I run the following code also get the same error;

<cfdump var="#event.getValue(“ExceptionBean”)#" abort=“true” />