Raise an error if rendering fails, instead of doing the dumbest thing possible.
Cleaned up exception handling.