[Rg 45] Re: Defining custom error action?
john at oxyliquit.de
Sat Jun 30 13:30:39 EDT 2007
> (I know this isn't Nitro general, but that's where I'm porting my app
no worries, everything's fine. :)
> In Nitro I can customize the error handling in a controller på creating
> my own 'error' method. If I try to do the same in Ramaze I get
> "undefined method `each' for nil:NilClass" with the following stack
> # The code that is causing the error
> class MainController < Ramaze::Controller
> def error
> # It doesn't matter what I put here, I always get the same error
Sidenote: If you use the newest ramaze repo, you can use
Ramaze::Dispatcher::Error.current instead of the thread var.
> Is it possible to use a custom error handler in Ramaze?
I guess the standard error-template is still getting loaded, that'd be
my guess anyway. Did you try creating an (empty?) error.xhtml in the
The error-handling in Ramaze is quite flexible, enabling you to create
different error handlers for different errors (I for example catch Og
errors nicely that way). error.rb for more info.
Hope that helps,
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Ramaze-general