Please don't use generic exceptions, there are a whole lot build-in: http://nl1.php.net/manual/en/spl.exceptions.php