Discussion:
[BitPim-devel] [bitpim-cvs-checkins] SF.net SVN: bitpim: [3896] trunk/bitpim
Roger Binns
2007-01-12 04:37:14 UTC
Permalink
# Something's wrong with this entry, log it and skip
A blanket exception is bad. Also you shouldn't need anything after the
'except'
+ self.log('Exception %s raised'%`e`)
That code is definitely wrong. `e` will produce a string. The %
operator wants a sequence and in this case wants the first member of the
sequence to be a string. So the line will end up logging the first
letter of the exception! It should be:

self.log('Exception %s raised' % (`e`,))

But more to the point, why isn't the builtin exception handling and
dialogs dealing with this? I doubt anyone reads their logs unless
something has gone visibly horribly wrong. If one entry out of 150 was
ignored by BitPim who would notice?

Roger

Loading...