5 <div class="container">
\r
8 Rescue is a way to associate a nice page to display some nasty error information.
\r
9 It's better than showing a stack trace to your final user.
\r
13 This very controller has two rescues associate. One for the entire class and another
\r
14 that overrides the rescue for an action.
\r
15 <a href="error.castle">Click here</a> to perform an erroneous action or
\r
16 <a href="othererror.castle">click here</a> to perform another erroneous action
\r
17 with an specialized rescue.
\r
20 The rescue views are
\r
21 <a href="${siteRoot}/code/showCode.castle?file=Views/Rescues/lie.vm">lie.vm</a>
\r
22 and <a href="${siteRoot}/code/showCode.castle?file=Views/Rescues/sincere.vm">sincere.vm</a>
\r
25 To associate a layout with your controller, use the Rescue attribute.
\r
26 Using it on class means that all actions will use it by default. You can override
\r
27 the rescue for an action using the same attribute on the method.
\r
31 [Rescue("generalerror")]
\r
32 public class HomeController : Controller
\r
38 [Rescue("databaseerror")]
\r