-
Jun 29th, 2011, 06:11 AM
#1
ExceptionHandler on method level.
Good Morning,
Is it possible to someone apply an exception handler to just a method rather than a full class?
My controller class has Ajax and non-Ajax methods. The former which return JSON responses and the latter which return a view.
I want to be able to catch exceptions implicitly on the Ajax methods and return a JSON response from the error seperately from the non-Ajax methods returning to an error view.
To get arround this I need to wrap my full ajax method in a try/catch for Throwable which is additional boiler plate I do not need.
It seems that it is a functional let down that you can only apply to a full class.
Thanks
Chris
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules