Log exception classes

Exception class names can often provide useful debugging information as they tend to be very descriptive.