-
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