-
Notifications
You must be signed in to change notification settings - Fork 83
Description
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];
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.
