title: Python not capturing try/except error
body: <p>I'm new to Python. Please forgive me if my question sounds stupid.</p>
  
  <p>The codes below will raise an error but the error is not captured by try/except. I've gone through them many times but couldn't see what is the problem.</p>
  
  <p>Would appreciate it very much if any Gurus here can show the problem to me.</p>
  
  <p>Thanks for your time.</p>
  
  <pre><code>import decimal
  
  try:
      Amount = str(decimal.Decimal('2.675a').quantize(decimal.Decimal('.01'), rounding=decimal.ROUND_HALF_UP))
      print Amount
  except ValueError:
      print 'Error'
  </code></pre>
  
  <p>The error I've got is:</p>
  
  <pre><code>File "C:\Python27\lib\decimal.py", line 548, in __new__
    "Invalid literal for Decimal: %r" % value)
  File "C:\Python27\lib\decimal.py", line 3866, in _raise_error
    raise error(explanation)
  InvalidOperation: Invalid literal for Decimal: '2.675a'
  </code></pre>