[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DeviceKit and /usr



Le mardi 08 septembre 2009 à 13:00 +0200, Bjørn Mork a écrit : 
> Trusting a library to do all your error handling and cleanup is not good
> style IMHO.  In addition to the lack of self-documenting source, it
> often leave you with the meaningless generic error messages some OSes
> are so full of.  Applications doing their own error handling are in a
> much better position to provide specific meaningfull error messages to
> the user.

If a memory allocation failed while you were manipulating strings (an
operation with very low requirements), you are not likely to obtain
enough memory to even display an error message.

Frankly, I prefer to be sure that the process will crash properly in
extreme cases. And more importantly, not having to handle return codes
for every function is much less prone to programming errors; something
that is shared by most Glib string utility functions. And programming
errors in string manipulations represent an important part of security
bugs.

-- 
 .''`.      Josselin Mouette
: :' :
`. `'   “I recommend you to learn English in hope that you in
  `-     future understand things”  -- Jörg Schilling

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: