Fix raise statement to use Exception

In Python 2.6+ it is not allowed to raise a str.

This change raises an Exception instead of a str. It is backward compatible with Python 2.5