microsoft/restler-fuzzer

don't swallow errors in the engine

Offen

#220 geöffnet am 21.05.2021

 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (329 Forks)auto 404
enginegood first issue

Repository-Metriken

Stars
 (2.929 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

There are many places in the engine, especially on the fuzzing thread, where exceptions are swallowed. We need to make sure exceptions are reported to be able to quickly diagnose errors.

This work item is opened to fix recently observed cases. For example:

    try:
        with open(grammar_path, 'r') as grammar:
            schema_json = json.load(grammar)
    except Exception as err:
        logger.write_to_main(f"Failed to process grammar file: {grammar_path}; {err!s}", print_to_console=True)
        sys.exit(-1)


except ValueError as err:
    logger.write_to_main(f"Failed to parse grammar file for examples: {err!s}", print_to_console=True)
    return False

Contributor Guide