I've got surprised while testing a piece of code that looked a bit like that:

```
if x:
    try:
           obj = look-for-item-with-id==x in a db
           if obj is None:
               # print debug message 
               raise NotFound('No item with this id')
           return obj
    except Exception, e:
        raise Error(e.message)

```

I expected that if there was no item with a provided id (x) in a db, the NotFound exception would be raised. But instead, after getting to if clause and printing debug message it gets to the except clause and raises the Exception (exc message is Item not found...). Could someone be so kind and enlighten me here?