You need to first create the exception class for merb to route
it properly.
Look at exceptions.rb [1]. Basically, you will want to create
your exception class (in this case FileMissing) and have it
inherit from an existing controller exception.
Starting from line 242 [2] is a list of all the exceptions with
their status codes. You will probably want to raise something in
the 4xx range.
So it would look something like:
class FileMissing < Merb::ControllerExceptions::BadRequest; end
That will send a status code of 400 anytime you raise
FileMissing, along with rendering the action as you have created
it in your exceptions controller.
[1] http://github.com/merb/merb/blob/master/merb-core/lib/merb-core/controller/exceptions.rb#L124
[2] http://github.com/merb/merb/blob/master/merb-core/lib/merb-core/controller/exceptions.rb#L242
> --
> You received this message because you are subscribed to the Google Groups "merb" group.
> To post to this group, send email to me...@googlegroups.com.
> To unsubscribe from this group, send email to merb+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/merb?hl=en.
>
--
-jonah