zekel zekel - 3 months ago 7x
Objective-C Question

Can you add custom compiler warnings in Objective-C?

(I found the answer to this elsewhere while writing the question, but I thought it might be helpful to others if I posted it since I couldn't find anything here.)

I want to mark methods that need better error handling. I'd like them to show up as compiler warnings so other developers (who may be responsible for that area) will notice, and hopefully fix at their leisure.

(Other approaches welcome, I looked at

but couldn't get it to work.)


It's very easy to do:

#warning Needs better error handling, please.