#33061: ValueError not raised by some cache backends for incr() / decr() with
negative delta?
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: Bug | Status: closed
Component: Core (Cache system) | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Chris Jerdonek):
> Why do you think that we should raise an error in this case?
It's not that an error should be raised from nothing. It's that
`ValueError` should be raised instead of `LibraryValueNotFoundException`.
If you look at the links to the code I provided, the `delta < 0` code path
isn't inside the try-except block a line later where that conversion takes
place for the `delta >= 0` case. Please look, and you will see what I
mean. This would just affect backends that derive from
`BaseMemcachedCache`.
--
Ticket URL: <https://code.djangoproject.com/ticket/33061#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.2ed978fb0afeb8e8efee226f27e948ec%40djangoproject.com.