def _handle_image_status(status, image, sdk_info, data): if status in ("found", "unused"): return elif status == "missing": package = image.get("code_file") # TODO(mitsuhiko): This check seems wrong? This call seems to # mirror the one in the ios symbol server support. If we change # one we need to change the other. if not package or is_known_third_party(package, sdk_info=sdk_info): return if is_optional_package(package, sdk_info=sdk_info): error = SymbolicationFailed( type=EventError.NATIVE_MISSING_OPTIONALLY_BUNDLED_DSYM) else: error = SymbolicationFailed(type=EventError.NATIVE_MISSING_DSYM) elif status == "malformed": error = SymbolicationFailed(type=EventError.NATIVE_BAD_DSYM) elif status == "too_large": error = SymbolicationFailed(type=EventError.FETCH_TOO_LARGE) elif status == "fetching_failed": error = SymbolicationFailed(type=EventError.FETCH_GENERIC_ERROR) elif status == "other": error = SymbolicationFailed(type=EventError.UNKNOWN_ERROR) else: logger.error("Unknown status: %s", status) return error.image_arch = image.get("arch") error.image_path = image.get("code_file") error.image_name = image_name(image.get("code_file")) error.image_uuid = image.get("debug_id") write_error(error, data)
def _handle_image_status(status, image, sdk_info, handle_symbolication_failed): if status in ('found', 'unused'): return elif status == 'missing': package = image.get('code_file') # TODO(mitsuhiko): This check seems wrong? This call seems to # mirror the one in the ios symbol server support. If we change # one we need to change the other. if not package or is_known_third_party(package, sdk_info=sdk_info): return if is_optional_package(package, sdk_info=sdk_info): error = SymbolicationFailed( type=EventError.NATIVE_MISSING_OPTIONALLY_BUNDLED_DSYM) else: error = SymbolicationFailed(type=EventError.NATIVE_MISSING_DSYM) elif status == 'malformed': error = SymbolicationFailed(type=EventError.NATIVE_BAD_DSYM) elif status == 'too_large': error = SymbolicationFailed(type=EventError.FETCH_TOO_LARGE) elif status == 'fetching_failed': error = SymbolicationFailed(type=EventError.FETCH_GENERIC_ERROR) elif status == 'other': error = SymbolicationFailed(type=EventError.UNKNOWN_ERROR) else: logger.error("Unknown status: %s", status) return error.image_arch = image.get('arch') error.image_path = image.get('code_file') error.image_name = image_name(image.get('code_file')) error.image_uuid = image.get('debug_id') handle_symbolication_failed(error)