Generic method to avoid server crash.

I think an unhandled error is an error, not just a warning. it means there's something we need to fix and it should probably be reported.