开发者

Can you show compiler warnings for error:nil?

Is there a compiler setting that can warn about these? Currently I'm reviewing code and putting in #warning don't use error:nil whenever I see them.

(I know it's sometimes appropriate to do, but maybe there is a better way to have the开发者_JAVA百科 compiler check sloppy error handling?)


No, since error:nil is completely legal and totally legit (as you even say), there is no way for the compiler to check it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜