3 ms·
This is common in Objective-C APIs but Objective-C will “auto-release” the error objects and attempting to send a message to a "nil" object does nothing at all.
by makecheck 10y ago
This is common in Objective-C APIs but Objective-C will “auto-release” the error objects and attempting to send a message to a "nil" object does nothing at all. Even better, Swift bindings will recognize that particular idiom as one of the supported ways to handle errors for use in Swift statements.
Therefore I would say this approach is bad for C and C++ but not bad in general.