(description)
return [exc, code, extra]
Returns up to three values. Exception Type as a string
	'EXC_BAD_ACCESS', Exception Code as a string (can be like '1'
	or like 'EXC_I386_GPFLT') and Extra as a string (can be an address
	'0x00000000' or a subcode '0x0')
Returns up to three values. Exception Type as a string
	'EXC_BAD_ACCESS', Exception Code as a string (can be like '1'
	or like 'EXC_I386_GPFLT') and Extra as a string (can be an address
	'0x00000000' or a subcode '0x0')
Returns up to three values . Exception Type as a string EXC_BAD_ACCESS Exception Code as a string ( can be like 1 or like EXC_I386_GPFLT ) and Extra as a string ( can be an address 0x00000000 or a subcode 0x0 )
def parse_stopDescription(description):
	'''
	Returns up to three values. Exception Type as a string
	'EXC_BAD_ACCESS', Exception Code as a string (can be like '1'
	or like 'EXC_I386_GPFLT') and Extra as a string (can be an address
	'0x00000000' or a subcode '0x0')
	'''
	# EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=1000 MB, unused=0x0)
	# EXC_BAD_ACCESS (code=2, address=0x100804000)
	# EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
	# EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

	table = str.maketrans(dict.fromkeys('(),'))
	desc = description.translate(table)

	if not (desc.startswith("EXC_") or desc.startswith("code=")):
		print("WARNING: Malformed exception description output %s" % desc)
		return None, None, None

	fields = desc.split()
	if "EXC_RESOURCE" in description:
		exc, code, extra = description.split(" ", 2)
		return [exc, code, extra]

	exc = fields[0]
	code = fields[1].split("=", 2)[1]
	extra = None
	for f in fields:
		if f.startswith("address=") or f.startswith("subcode="):
			extra = f.split("=", 2)[1]
			break

	return [exc, code, extra]
def parse_stopDescription ( description ) : # EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=1000 MB, unused=0x0) # EXC_BAD_ACCESS (code=2, address=0x100804000) # EXC_BAD_ACCESS (code=EXC_I386_GPFLT) # EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) table = str . maketrans ( dict . fromkeys ( '(),' ) ) desc = description . translate ( table ) if not ( desc . startswith ( "EXC_" ) or desc . startswith ( "code=" ) ) : print ( "WARNING: Malformed exception description output %s" % desc ) return None , None , None fields = desc . split ( ) if "EXC_RESOURCE" in description : exc , code , extra = description . split ( " " , 2 ) return [ exc , code , extra ] exc = fields [ 0 ] code = fields [ 1 ] . split ( "=" , 2 ) [ 1 ] extra = None for f in fields : if f . startswith ( "address=" ) or f . startswith ( "subcode=" ) : extra = f . split ( "=" , 2 ) [ 1 ] break return [ exc , code , extra ]