propelorm/Propel — Issue #165: Namespaced Base classes need to import \Exception;
Author: analytik
Created: 2011-10-26 07:40:05+00:00
State: open

It seems that when I get a duplicate entry when trying to save an object, Propel doesn't catch the `PDOException`, because
`catch (Exception $e)`
in `BaseUser::doInsert()` doesn't work.

The problem with PHP try/catch is that they don't throw any sort of error when you try to use a class that doesn't exist. I can as well write
`catch (ExceptionalNonsense $e)`
and it would still do the same thing.

this can be fixed by either using `catch (\Exception $e)`
or by adding `use \Exception;` in the header.