コード例 #1
0
 /// <summary>
 /// Occurs when exception thrown event is raised.
 /// </summary>
 /// <param name="sender">Object that triggers the event.</param>
 /// <param name="e">Provides data for the exception thrown event.</param>
 static void Factory_ExceptionThrown(object sender, ExceptionThrownEventArgs e)
 {
     if (_log.IsWarnEnabled)
     {
         _log.Warn(e.Exception.Message);
     }
 }
        /// <summary>
        /// Occurs when exception thrown event is raised.
        /// </summary>
        /// <param name="e">Provides data for the exception thrown event.</param>
        protected virtual void OnExceptionThrown(ExceptionThrownEventArgs e)
        {
            var handler = ExceptionThrown;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #3
0
        private void GameOnExceptionThrown(object sender, ExceptionThrownEventArgs e)
        {
            if (!IsActive)
            {
                return;
            }

            e.Handled = true;
            editor.Dispatcher.InvokeAsync(() => editor.LastException = e.Exception).Forget();
        }
コード例 #4
0
 private void OnJavaScriptExceptionThrown(object sender, ExceptionThrownEventArgs e)
 {
     if (this.JavaScriptExceptionThrown != null)
     {
         this.JavaScriptExceptionThrown(this, new JavaScriptExceptionThrownEventArgs()
         {
             Message = e.Message
         });
     }
 }
        /// <summary>
        /// Occurs when exception thrown event is raised.
        /// </summary>
        /// <param name="sender">Object that triggers the event.</param>
        /// <param name="e">Provides data for the exception thrown event.</param>
        private void Exception_Thrown(object sender, ExceptionThrownEventArgs e)
        {
            //  Bubbles up the event to the parent.
            var handler = this.ExceptionThrown;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
コード例 #6
0
ファイル: V100JavaScript.cs プロジェクト: nikhildas/selenium
        private void OnRuntimeExceptionThrown(object sender, Runtime.ExceptionThrownEventArgs e)
        {
            // TODO: Collect stack trace elements
            var wrapped = new ExceptionThrownEventArgs()
            {
                Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp),
                Message   = e.ExceptionDetails.Text
            };

            this.OnExceptionThrown(wrapped);
        }
コード例 #7
0
 private void OnExceptionThrown(object sender, ExceptionThrownEventArgs e)
 {
     Log("An error has occurred: " + e.Exception.Message);
 }
コード例 #8
0
 private void DashButtonListener_OnExceptionThrown(object sender, ExceptionThrownEventArgs e)
 {
     OnExceptionThrown(e.Exception);
 }