IOSAD-143 Correct error handling. IOSAD-143
authorDirk Zimmermann <dz@pep.security>
Tue, 01 Oct 2019 17:12:18 +0200
branchIOSAD-143
changeset 12977ba3a4d1b01d
parent 1296 201a8b383494
child 1298 7c7473e9766b
IOSAD-143 Correct error handling.
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Tue Oct 01 17:12:18 2019 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Tue Oct 01 17:12:18 2019 +0200
     1.3 @@ -37,13 +37,12 @@
     1.4      if (self) {
     1.5          [PEPInternalSession setupTrustWordsDB];
     1.6  
     1.7 -        NSError *error = nil;
     1.8 -
     1.9          // Get an engine session from PEPSync, because its creation requires callbacks
    1.10          // that PEPSync is responsible for.
    1.11 -        _session = [PEPSync createSession:&error];
    1.12 +        _session = [PEPSync createSession:nil];
    1.13  
    1.14 -        if (error) {
    1.15 +        // [PEPSync createSession:] has already logged any errors.
    1.16 +        if (!_session) {
    1.17              return nil;
    1.18          }
    1.19      }