Nick
Nick

Reputation: 1875

Custom Errors in FubuMVC

Does FubuMVC work out of the box with custom error settings in the web.config or do I need to do extra work?

It is not working at the moment, but I'm not sure if I have done something wrong.

Upvotes: 2

Views: 142

Answers (1)

KevM
KevM

Reputation: 2506

I rolled a behavior for this a while back and wrote up a post about the technique.

FubuMVC Hijacking Behaviors

The configuration wraps selected actions in a behavior which directs the user to an error handling endpoint giving the view model for that endpoint the exception that occurred. You can use this to simulate your own custom error handling page (e.g. yellow screen of death).

This behavior does check the application IsCustomErrorsEnabled flag for nice development behavior.

Note: I am not sure how well this behaves on the newest version 0.99 nugets. I'll do my best to update when we move our project to the lastest bits.

Also: I think that this technique could benefit from some new functionality coming in the 0.99 nugets where you can chain behaviors together easily. Corey Kaylor talks about this in his post Creating a Diversion.

Upvotes: 1

Related Questions