From: zooko Date: Fri, 9 Nov 2007 02:18:27 +0000 (+0530) Subject: zfec: make precondition violation exception message more meaningful to the user X-Git-Url: https://git.rkrishnan.org/pf/content/en.html?a=commitdiff_plain;h=ad223e795dbcc9071cd5bf883322b12d36e6cca6;p=tahoe-lafs%2Fzfec.git zfec: make precondition violation exception message more meaningful to the user darcs-hash:447d20434d0f0669b27e807da6a1b21f6f22e1cb --- 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;