Developer forum

Forum » Development » Subscriber to handle exceptions

Subscriber to handle exceptions

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Is there a global subscriber that lets me handle specific exceptions? I have a case where I need to intercept an exception being thrown in the application and then clear some cookies that are related to that exception. What's the best subscriber for that? Is there a one specifically for this or should I handle something broader like OnOutput?

Thanks!

Imar


Replies

 
Martin Vang
Martin Vang
Reply

Hi Imar,

I don't believe that we have one of those - and I would really like to hear the usecase for it. :)

When the application enters an exception state (application unstable/broken somehow) you want to use our NotificationFramework and our CookieManager to do more work? But ... what if they become unstable/break? => Headache. :(

BR

Martin

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

The use case is the "Cart can only contain cart items" exception that was recently added. We have some legit users with broken carts. When this exception occurs, I like to delete their cart cookies using HttpContext directly so they can continue shopping with a new cart. I can't tell all of them to clear their cookies... ;-)

 

You must be logged in to post in the forum