Request for feedback: Error handler modifications

I would like to hear some feedback on this. It is not yet meant to be merged, since it lacks tests.

refs #174