<p>Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to.</p>

<p>We use liquid templates to customise the presentation for each client. We are unable to customise the generic 'We're Sorry, somethign went wrong..' message for each client.</p>

<p>Can anyone recommend an approach that would allow us to do this.</p>

<p>Thanks</p>

<p>DOm</p>

For catching exceptions in Rails 2,
```
rescue_from
```
controller method is a great way to specify actions which handle various cases.
```
```
class ApplicationController < ActionController::Base
  rescue_from MyAppError, :with => :show_errors

  def show_errors
    render :action => "..."
  end
end
```
```
This way you can make dynamic error pages to replace the static "public/500.html" page.