def classify_failure(message):
    """Look for a reason for a failure by looking for a string
    in the message.  Return a string with the reason, or None
    if we don't know what it was.
    """

    failure_types = [
            ("Non-zero exit code", "Exit now"),
            ("Not implemented", "has not been implemented"),
            ("SR zenith angle", "Solar zenith angle is out of range"),
            ("SR zenith angle", "solar zenith angle out of range"),
            ("SR unavailable", \
                    "include_sr is an unavailable product option"),
            ("Missing auxiliary data", \
                    "Could not find auxnm data file"),
            ("Missing TOMS data", \
                    "Could not find TOMS auxiliary data"),
            ("Surface temperature failed", \
                    "surface_temperature failed:"),
            ("No such file", "No such file or directory"),
            ("Log throttling exception",
                    "(ThrottlingException) when calling the CreateLogStream"),
            ("Exception", "Exception")
    ]

    for (reason, err_string) in failure_types:
        if message.find(err_string) != -1:
            return reason

    return None