Skip to content

Passing up parameters does not work #90

@anthonygeranio

Description

@anthonygeranio

Overview

I am trying to log custom exceptions using Airbrake to pair with our existing web client integration.

Usage

I am performing custom logging like so:

let exception = NSException(name: .init(rawValue: title), reason: subtitle, userInfo: nil)
ABNotifier.logException(exception, parameters: ["userId":"anthony"]

It looks like Airbrake is logging the error itself just fine, but not attaching any of the parameters to the environment section on the website.

After doing some further research, it looks like in ABNotifier.m under logException:withParameters we do not add the exceptionParameters to the final dictionary we pass to Airbrake. The dictionary only contains the exception name, reason, and call stack. It is missing the exception parameters and current view controller.

Specifically,

NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [exception name], ABNotifierExceptionNameKey,
                                        [exception reason], ABNotifierExceptionReasonKey,
                                        [exception callStackSymbols], ABNotifierCallStackKey,
                                        exceptionParameters, ABNotifierExceptionParametersKey,
#if TARGET_OS_IPHONE
                                        ABNotifierCurrentViewController(), ABNotifierControllerKey,
#endif
                                        nil];

screen shot 2018-05-21 at 3 30 41 pm

Expected Behavior

I would expect that the parameters properly get passed up and then I can view them in Environment unless I am not looking in the right place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions