title: how to create rails 3 custom exceptions
body: <p>i am creating some custom exceptions as follows</p>
  
  <p>lib/exceptions.rb</p>
  
  <pre><code>module Exceptions
    class MemberOverFlow &lt; StandardError
    end
    rescue_from MemberOverFlow do |exception|
      redirect_to root_url, :alert =&gt; exception.message
    end
  end
  </code></pre>
  
  <p>I use to raise the exception like this.</p>
  
  <pre><code>raise Exception::MemberOverFlow"member count overflow"
  </code></pre>
  
  <p>It giving the following error</p>
  
  <pre><code>NoMethodError in MembersController#create
  
  undefined method `MemberOverFlow' for Exception:Class
  </code></pre>
  
  <p>can anyone tell me what is problem</p>
  
  <p>thanks</p>