p-e-w / finalterm

At last – a modern terminal emulator (NO LONGER MAINTAINED)
http://finalterm.org
GNU General Public License v3.0
3.84k stars 179 forks source link

Get rid of a couple warning messages. #341

Open lwandrebeck opened 9 years ago

lwandrebeck commented 9 years ago

....

p-e-w commented 9 years ago

Thank you for your effort here. I have to admit I'm a bit undecided as to whether I actually want to merge this. As it stands, this adds 15 lines of code with no benefit at all (as indicated in the comments, this is not "real" error handling) besides silencing the warnings, especially in the case of the regex which is almost guaranteed not to fail in practice. I merged such a PR before and have regretted it many times since as the try/catch clauses needlessly clutter up the code (and add indentation). The truth is that the valac (and gcc!) warnings are probably never going to disappear because Vala itself simply has too many bugs. What do you think, is the removal or a few warnings worth the clutter?

I'm not referring to the add_child fix here of course, that one makes perfect sense.

P.S.: For some reason your commit messages are doubled. Don't know what's going on here.

p-e-w commented 9 years ago

To be honest, I have often considered removing most existing try/catch clauses to simplify the code at the cost of a few additional warning messages, which have never helped me in the past anyway.