brintos

brintos / llvm-project-archived public Read only

0
0
Text · 595 B · 4de389b Raw
14 lines · plain
1.. title:: clang-tidy - objc-avoid-nserror-init2 3objc-avoid-nserror-init4=======================5 6Finds improper initialization of ``NSError`` objects.7 8According to Apple developer document, we should always use factory method9``errorWithDomain:code:userInfo:`` to create new NSError objects instead10of ``[NSError alloc] init]``. Otherwise it will lead to a warning message11during runtime.12 13The corresponding information about ``NSError`` creation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html14