title: How do I raise an exception in Rails so it behaves like other Rails exceptions?
body: <p>I would like to raise an exception so that it does the same thing a normal Rails exception does. Specially, show the exception and stack trace in development mode and show "We're sorry, but something went wrong" page in production mode. </p>
  
  <p>I tried the following:</p>
  
  <pre><code>raise "safety_care group missing!" if group.nil?
  </code></pre>
  
  <p>But it simply writes <code>"ERROR signing up, group missing!"</code> to the development.log file</p>