Mindscape.Raygun4Net.RaygunClient.AttachCrashReporting C# (CSharp) Method

AttachCrashReporting() public method

Causes Raygun to listen to and send all unhandled exceptions and unobserved task exceptions. Native iOS exception reporting is not enabled with this method, an overload is available to do so.
public AttachCrashReporting ( ) : RaygunClient
return RaygunClient
        public RaygunClient AttachCrashReporting()
        {
            return AttachCrashReporting(false, false);
        }

Same methods

RaygunClient::AttachCrashReporting ( bool canReportNativeErrors, bool hijackNativeSignals ) : RaygunClient

Usage Example

Example #1
0
        /// <summary>
        /// Causes Raygun to listen to and send all unhandled exceptions and unobserved task exceptions.
        /// </summary>
        /// <param name="apiKey">Your app api key.</param>
        /// <param name="user">An identity string for tracking affected users.</param>
        /// <param name="reportNativeErrors">Whether or not to listen to and report native exceptions.</param>
        public static void Attach(string apiKey, string user, bool reportNativeErrors)
        {
            Detach();

            if (_client == null)
            {
                _client = new RaygunClient(apiKey);
            }

            _client.AttachCrashReporting(reportNativeErrors);

            _client.SetUserInfo(user);
        }