Exceptions caching

Catch exceptions, and log them as Internal Errors.