title: How to include Custom exception in Rails?
body: <p>I don't understand well how Rails include (or not?) some file from the app directory. </p>
  
  <p>For example, I've created a new directory app/exceptions for create my own exceptions. Now, from a helpers file, I want to raise one of my exception. </p>
  
  <p>Am I suppose to include something in this helper?</p>
  
  <p><strong>The Helper: helpers/communications_helper.rb</strong></p>
  
  <pre><code>//should I include something or it's suppose to be autoloaded?
  module CommunicationsHelper
   begin.
   .
   . 
   .
    raise ParamsException, "My exception is lauch!"
   rescue StandardError =&gt; e
  ...
   end
  end
  </code></pre>
  
  <p><strong>The exception: exceptions/params_exception.rb</strong></p>
  
  <pre><code>class ParamsException &lt; StandardError
    def initialize(object, operation)
      puts "Dans paramsException"
    end
  
  end
  </code></pre>
  
  <p>Nothing specific from my raise in the output...</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:
  Thanks to all, your two answers was helpful in different way.
  I didn't raise well the exception like you said, but I've also forggot to update my config.rb.
   so now I 've:</p>
  
  <pre><code>rescue StandardError =&gt; e
    raise ParamsError.new("truc", "truc")
  </code></pre>
  
  <p>Other question, do you know where can I catch the raise?
  Cause I'm already in a catch block, so I'm little lost...</p>