I have followed the docs as well as I am able, but am not having luck. We are migrating to CF9 and CB 3M5 (never previously having used a framework). We have a number of existing custom tags. One tag we want to call on every single request. I created a preProcess interceptor to do just that. This tag currently checks for some specific things, and, depending on what it finds, writes to a table and relocates to an error page. I’ve done a bit of modification to this, but could not get it to show the error page decorated with my layout. So, I thought I should have the custom tag throw an error when called from CB (indicated by an attribute) and have the exception handler take over. The exception handler is set to point to Main.onException(). I then have a switch on the exception, just as I’ve seen from in the documentation, and I case for my specific type. I can see that I execute the appropriate case statement, but I still do not get my view decorated even though I am using event.seView(‘myErrorView’). Instead, I get the standard Oops page. I did not think I should be using setNextEvent for this page has nothing to do with a handler.
I can see, upon closer reading of the documentation, that the behavior I am getting is expected. It indicates that I should set a **CustomErrorTemplate**. This means, from what I can tell, that all my errors (exceptions) would use this same template. This is not what I want. I want to have a variety of error pages. We have a number of custom tags that each displaying different messages. And, I want all of them decorated with the layout. Any suggestions on how to achieve my desired end result? Note, we want to continue to use this custom tag with existing applications, and I do not want to repeat myself by having to duplicate a bunch of logic for every CF/CB project (I feel I am already doing plenty of that, what with setting up the interceptor and the error handling and the view).