title: Store Exception Class Name for StandardError in Rails
body: <p>I have defined a couple of custom exception classes that inherit from StandardError like so:</p>
  
  <pre><code>class InvalidPage &lt; StandardError;end
  </code></pre>
  
  <p>If this exception is being raised I want to rescue it and store it to my DB for reference. So far I save its message and backtrace, but I can't seem to save its Name (InvalidPage) as well. I have tried:</p>
  
  <pre><code>InvalidPage.class
  InvalidPage.class.name
  InvalidPage.name
  </code></pre>
  
  <p>but none of the above works for me.</p>
  
  <p>How can I access and save the Exception Name together with the message and backtrace?</p>