Write exception type into "type" field.