extracts useful information from an error stack