Generates exception fingerprints for grouping.