Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setException deprecated #328

Open
wolfAle opened this issue Mar 8, 2019 · 0 comments
Open

setException deprecated #328

wolfAle opened this issue Mar 8, 2019 · 0 comments

Comments

@wolfAle
Copy link

wolfAle commented Mar 8, 2019

Hi guys,

I'm working on an old codebase and we have many warnings about:
'exception' is deprecated: 'BFTask' exception handling is deprecated and will be removed in a future
It happens in cases like this:

@try {
        [[ILRLogin sharedManager] activeWithServer:server];
        LRSession *session = [[ILRLogin sharedManager] getAuthSession];
        [session onSuccess:^(id result) {
           ............
        } onFailure:^(NSError *err) {
           ............
        }];        
    } @catch (NSException *exception) {
        [task setException:exception]; --> HERE
    }

or even in the caller, where I check if(task.exception).
I googled a lot but I couldn't find advices about what to do instead.
Is there a replacement method? Should I just ignore the exception in the catch block?
Can you please point me in the right direction here?

Thanks,
Alessandro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant