Commit bb887ddb authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

As UI/UX improvement, try and avoid printing an extended traceback if...

As UI/UX improvement, try and avoid printing an extended traceback if diffoscope runs out of memory.

However:

> Note that because of the underlying memory management architecture (C’s
> malloc() function), the interpreter may not always be able to completely
> recover from this situation; it nevertheless raises an exception so that a
> stack traceback can be printed, in case a run-away program was the cause.

— https://docs.python.org/2/library/exceptions.html#exceptions.MemoryError
parent e5e8d51e
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -773,6 +773,9 @@ def main(args=None):
            raise
        logger.error("No space left on device. Diffoscope exiting.")
        sys.exit(2)
    except MemoryError:
        logger.error("Out of memory. Diffoscope exiting.")
        sys.exit(2)
    except KeyboardInterrupt:
        logger.error("Keyboard Interrupt")
        sys.exit(2)