Re: [bitpim-cvs-checkins] SF.net SVN: bitpim: [3896] trunk/bitpim

Roger Binns <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[email protected] wrote:
> +            except Exception, e:
>                  # 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFpxB6mOOfHg372QQRAm23AKDjDL3rl4v4kGOXPTpkH2oesCJqUgCgivH+
AdcIwWz0+mzg3R/K+Ly4/Cc=
=TJb5
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.