Esempio n. 1
0
        /// <inheritdoc />
        public SentryId CaptureEvent(SentryEvent? @event, Scope?scope = null)
        {
            if (@event == null)
            {
                return(SentryId.Empty);
            }

            try
            {
                return(DoSendEvent(@event, scope));
            }
            catch (Exception e)
            {
                _options.LogError("An error occurred when capturing the event {0}.", e, @event.EventId);
                return(SentryId.Empty);
            }
        }
Esempio n. 2
0
        /// <inheritdoc />
        public SentryId CaptureEvent(SentryEvent? @event, Scope?scope = null)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(nameof(SentryClient));
            }

            if (@event == null)
            {
                return(SentryId.Empty);
            }

            try
            {
                return(DoSendEvent(@event, scope));
            }
            catch (Exception e)
            {
                _options.LogError("An error occurred when capturing the event {0}.", e, @event.EventId);
                return(SentryId.Empty);
            }
        }