Added server-side logging of exceptions