[chirp_devel] [developer] Control fontsize of hex diff/dumpdisplay - #1681
Dan Smith
Fri Jun 6 15:39:12 PDT 2014
> For the first, what you're suggesting would be
> except:
> fontsize = 11
> ??
> I did test what happens if diff_fontsize is not there in chirp.config
> and what I submitted handles it. Does that cover your concern?
Well, you can ignore this for the moment. In general, it's bad form to
catch Exception, which will swallow anything. It's better to catch the
actual thing you're expecting, so that if anything unexpected happens,
it bubbles up and gets noticed.
However, I see that the ChirpConfigProxy wrapper is not going to raise a
sane exception for the case you're going to hit here. So, I'll retract
my comment on the grounds that my code you're calling is kinda broken :)
> I'll look at specifying some weird fontsize and see if I can get
> an exception generated and make sure it's handled.
> I thought about bounds checking, but I figured the users are
> developers and could deal with the results of specifying something strange.
> But if it's just a try/except clause, seems worth it.
Well, just see what happens. If it's something we can just log to the
debug log that the size was unsupported and default back to 11, that
seems like a good idea.
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140606/b9e15bb3/attachment-0001.bin
More information about the chirp_devel
mailing list