You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Add support for NSError and NSException reporting #15011
However, after I re-check the -[MMEEventsManager reportException:], this function is not
a realtime reporting(they are pushed into an event queue and some triggers can flush to server) but most of exception in our SDK is realtime raised.
So there is a problem that, if we use this function to report these events, the exception should not be raised, otherwise we may lost most of events since these events are not wrote in disk. But I think it's necessary to throw exception, which let developers know what&where the bug is.
So shall we make a real-time reporting or write these event into disk? Or we just ignore those raised exceptions and only collect some try-catch block ones? @alfwatt@julianrex
@m-stephen we don't have a way to flag an event as 'real time' or 'send immediately' right no, and I don't think we should start throwing exceptions unless there's a real programmer error. Better to use NSError objects and reportError:
@alfwatt will this be solved when we have deferred telemetry? It sounds like, even if we do, we'll need a way to flush the in-memory events to disk, before raising the exception.
Activity
[-]Add support for error and exception reporting[/-][+]Add support for NSError and NSException reporting[/+]m-stephen commentedon Jul 31, 2019
Sorry for updating this ticket late.
I'm trying to make a function like this for instead of using
[NSException raise: format:]directly in our SDK:However, after I re-check the
-[MMEEventsManager reportException:], this function is nota realtime reporting(they are pushed into an event queue and some triggers can flush to server) but most of exception in our SDK is realtime raised.
So there is a problem that, if we use this function to report these events, the exception should not be raised, otherwise we may lost most of events since these events are not wrote in disk. But I think it's necessary to throw exception, which let developers know what&where the bug is.
So shall we make a real-time reporting or write these event into disk? Or we just ignore those raised exceptions and only collect some
try-catchblock ones? @alfwatt @julianrexalfwatt commentedon Aug 1, 2019
@m-stephen we don't have a way to flag an event as 'real time' or 'send immediately' right no, and I don't think we should start throwing exceptions unless there's a real programmer error. Better to use
NSErrorobjects andreportError:julianrex commentedon Sep 10, 2019
@alfwatt will this be solved when we have deferred telemetry? It sounds like, even if we do, we'll need a way to flush the in-memory events to disk, before raising the exception.