Write exception type into "type" field.

It could be very useful to identify an exception type.