File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
extension/apple/ExecuTorch/Exported Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ NSString *ExecuTorchErrorDescription(ExecuTorchErrorCode code)
6363 * @return An NSError with ExecuTorchErrorDomain, the specified code, and a localized description.
6464 */
6565FOUNDATION_EXPORT
66+ NS_RETURNS_RETAINED
6667__attribute__ ((deprecated(" This API is experimental." )))
6768NSError *ExecuTorchErrorWithCode(ExecuTorchErrorCode code)
6869 NS_SWIFT_NAME(Error(code:));
@@ -75,6 +76,7 @@ NSError *ExecuTorchErrorWithCode(ExecuTorchErrorCode code)
7576 * @return An NSError with ExecuTorchErrorDomain, the specified code, and a localized description.
7677 */
7778 FOUNDATION_EXPORT
79+ NS_RETURNS_RETAINED
7880 __attribute__ ((deprecated(" This API is experimental." )))
7981 NSError *ExecuTorchErrorWithCodeAndDescription(ExecuTorchErrorCode code, NSString * __nullable description)
8082 NS_SWIFT_NAME(Error(code:description:));
Original file line number Diff line number Diff line change 5858}
5959
6060NSError *ExecuTorchErrorWithCodeAndDescription (ExecuTorchErrorCode code, NSString * __nullable description) {
61- return [NSError errorWithDomain : ExecuTorchErrorDomain
62- code: code
63- userInfo: @{
61+ return [[ NSError alloc ] initWithDomain : ExecuTorchErrorDomain
62+ code: code
63+ userInfo: @{
6464 NSLocalizedDescriptionKey :
6565 description.length > 0
6666 ? [ExecuTorchErrorDescription (code) stringByAppendingFormat: @" : %@ " , description]
You can’t perform that action at this time.
0 commit comments