title: Exception class code not working
body: <p>This is what I got:</p>
  
  <pre><code>class E2Exception(Exception):
      pass
  
  
  class E2OddException(E2Exception):
      pass
  
  
  def raiser(x):
      if x == "So sue me!":
          raise E2Exception
      elif x != "So sue me!" and x not int:
          raise ValueError
      elif int(x) % 2 != 0:
          raise E2OddException()
      else:
          return None
  </code></pre>
  
  <p>How do we say if x is not convertible to an int, do this?</p>
  
  <p>Also, I'm getting this error:</p>
  
  <p>builtins.TypeError: exceptions must derive from BaseException</p>
  
  <p>What does this mean?</p>
  
  <p>Instructions below</p>
  
  <hr>
  
  <p><code>E2Exception</code>: an exception class that is a subclass of <code>Exception</code>.</p>
  
  <p><code>E2OddException</code>: an exception class that is a subclass of <code>E2Exception</code>.</p>
  
  <p><code>raiser</code>, a function that takes one parameter <code>x</code>, with the following behaviour:</p>
  
  <ul>
  <li><p>If <code>x == 'So sue me!'</code>, then <code>raiser(x)</code> raises <code>E2Exception</code> with the exception
  message <code>"New Yorker"</code>.</p></li>
  <li><p>If <code>x != 'So sue me!'</code>, but <code>x</code> is still not convertible 
  to an int (by calling <code>int(x)</code>), then <code>raiser(x)</code> raises a <code>ValueError</code>, without any 
  requirement on the exception message</p></li>
  <li><p>If <code>x</code> converts to an odd <code>int</code>, <code>raiser(x)</code> raises an 
  <code>E2OddException</code>, without any requirement on the exception message.</p></li>
  <li><p>Otherwise, <code>raiser(x)</code> does nothing (no return, no print, nothing at all).</p></li>
  </ul>