SourceGrid.GridVirtual.OnUserException C# (CSharp) Method

OnUserException() public method

Event fired when an exception is throw in some method that require a notification to the user. If not handled by the user (Handled property = false) a MessageBox is used to display the exception.
public OnUserException ( ExceptionEventArgs e ) : void
e ExceptionEventArgs
return void
        public virtual void OnUserException(ExceptionEventArgs e)
        {
            #if DEBUG
            System.Diagnostics.Debug.WriteLine("Exception on editing cell: " + e.Exception.ToString());
            #endif

            if (UserException!=null)
                UserException(this, e);

            if (e.Handled == false)
            {
                DevAge.Windows.Forms.ErrorDialog.Show(this, e.Exception, "Error");
                e.Handled = true;
            }
        }