blob: 2e15ccaa273349ca47ba0a3a19b3e7685fe63b09 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/testing/nserror_util.h"
#import <Foundation/Foundation.h>
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
// A custom NSError subclass that is marked as an eDO "value type", allowing
// it to be serialized and reconstructed in the remote process, rather than
// having all its method proxied via IPC.
@interface ChromeRemoteError : NSError
@implementation ChromeRemoteError
- (BOOL)edo_isEDOValueType {
return YES;
namespace testing {
NSError* NSErrorWithLocalizedDescription(NSString* error_description) {
NSString* errorDomain = @"";
NSDictionary* userInfo = @{
NSLocalizedDescriptionKey : error_description,
return [[ChromeRemoteError alloc] initWithDomain:errorDomain
} // namespace testing