• Kirill Smelkov's avatar
    bigfile/py: Raise MemoryError for ENOMEM errno · 2cf9073f
    Kirill Smelkov authored
    Currently we always raise RuntimeError for problems, which is
    more-or-less ok for humans, but soon we'll need to distinguish "no
    memory" errors from other error conditions in upper layers in code.
    
    Introduce helper function for choosing appropriate exception type for an
    error - MemoryError for when errno=ENOMEM and RuntimeError otherwise,
    and use it where appropriate.
    
    ( Unfortunately Python does not provide such a helper... )
    2cf9073f
_bigfile.c 22.8 KB