Completion of error handling

Thiago Macieira thiago at
Sun Nov 23 11:26:46 GMT 2008

Markus Elfring wrote:
>Thiago Macieira schrieb:
>> Checking every return value is not acceptable, especially if the error
>> condition is out-of-memory or another out-of-resource situation.
>Do you prefer to handle a segmentation violation (SIGSEGV) because of a
>null pointer?

No, of course not.

If a function can return a null pointer under normal conditions, then the 
return value must be checked.

If it can return null only on an exceptional condition (such as out of 
memory), then the checking can be skipped.

>Would you like to depend on an OOM killer (by the operating system)?

Yes, the OOM killer must be in working order. We depend on it.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list