Hello,
I am trying to make use of custom rescues, but so far, I am not really
getting anywhere.
On my controller I have:
[Rescue(typeof(RescuesController), "Json")]
[return: JSONReturnBinder]
public object JsonException()
{
throw new Exception("hello, bad world!");
}
which should fire this:
public class RescuesController : BaseController, IRescueController
{
private Exception _exception;
[return: JSONReturnBinder]
public ViewDataBase Json()
{
return new ViewDataBase(ActionResult.Failure,
_exception.Message, null);
}
public void Rescue(Exception exception, IController controller,
IControllerContext controllerContext)
{
_exception = exception;
}
}
but instead I am getting just ye olde yellow screen with the thrown
exception. Nothing indicates that it would fail on getting the rescue to
run...
What am I doing wrong?
--
Jan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---