Pass PHP exceptions up to Python (basic support).
Revise some tests related to exceptions.