title: Is it against convention to make a custom exception raise itself?
body: <p>I wrote code to create a custom exception as shown below:</p>
  <pre><code>class AmountNotFeasible(Exception):
      def __init__(amount):
          self.amount = amount
          if self.amount &lt; 0:
              raise self
  amt = float(input(&quot;Enter amount: &quot;))
  try:
      AmountNotFeasible(amt)
  
  except AmountNotFeasible:
      print(&quot;Amount lower than zero not acceptable!!&quot;)
  </code></pre>
  <p>This works and raises the exception. I am wondering if it violates any conventions or if it simply is a not a good idea. A scenario for its use is a program where, say, a user is being asked for his salary, or age even but the program is not to accept a negative value.</p>