From ad223e795dbcc9071cd5bf883322b12d36e6cca6 Mon Sep 17 00:00:00 2001 From: zooko Date: Fri, 9 Nov 2007 07:48:27 +0530 Subject: [PATCH] zfec: make precondition violation exception message more meaningful to the user darcs-hash:447d20434d0f0669b27e807da6a1b21f6f22e1cb --- zfec/zfec/_fecmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zfec/zfec/_fecmodule.c b/zfec/zfec/_fecmodule.c index 629a69e..a22a462 100644 --- a/zfec/zfec/_fecmodule.c +++ b/zfec/zfec/_fecmodule.c @@ -177,7 +177,7 @@ Encoder_encode(Encoder *self, PyObject *args) { if (PyObject_AsReadBuffer(fastinblocksitems[i], (const void**)&(incblocks[i]), &sz)) goto err; if (oldsz != 0 && oldsz != sz) { - py_raise_fec_error("Precondition violation: Input blocks are required to be all the same length. oldsz: %Zu, sz: %Zu", oldsz, sz); + py_raise_fec_error("Precondition violation: Input blocks are required to be all the same length. length of one block was: %Zu, length of another block was: %Zu", oldsz, sz); goto err; } oldsz = sz; @@ -438,7 +438,7 @@ Decoder_decode(Decoder *self, PyObject *args) { if (PyObject_AsReadBuffer(fastblocksitems[i], (const void**)&(cblocks[i]), &sz)) goto err; if (oldsz != 0 && oldsz != sz) { - py_raise_fec_error("Precondition violation: Input blocks are required to be all the same length. oldsz: %Zu, sz: %Zu\n", oldsz, sz); + py_raise_fec_error("Precondition violation: Input blocks are required to be all the same length. length of one block was: %Zu, length of another block was: %Zu\n", oldsz, sz); goto err; } oldsz = sz; -- 2.45.2