Improve error message

Add *what* UID was returned in case savemessage did not return a UID>0

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-01-09 09:57:36 +01:00
parent 3284e010ff
commit d72bb88729

View File

@ -191,7 +191,8 @@ class MappedIMAPFolder(IMAPFolder):
newluid = self._mb.savemessage(-1, content, flags, rtime)
if newluid < 1:
raise ValueError("Backend could not find uid for message")
raise ValueError("Backend could not find uid for message, returned "
"%s" % newluid)
self.maplock.acquire()
try:
self.diskl2r[newluid] = uid