Skip to content

ArgumentException in RegexHelperDialog #476

@AndisGrossteins

Description

@AndisGrossteins

1) Unhandled ArgumentException in "Regex-Helper", after testing RegEx search and clicking "OK":

System.ArgumentException: Items collection cannot be modified when the DataSource property is set.Items collection cannot be modified when the DataSource property is set. System.ArgumentException System.ArgumentException: Items collection cannot be modified when the DataSource property is set.
   at System.Windows.Forms.ComboBox.CheckNoDataSource()
   at System.Windows.Forms.ComboBox.ObjectCollection.Insert(Int32 index, Object item)
   at LogExpert.UI.Dialogs.RegexHelperDialog.OnButtonOkClick(Object sender, EventArgs e) in C:\Development\LogExpert\src\LogExpert.UI\Dialogs\RegexHelperDialog.cs:line 113
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)

2) Also, in Program.Application_ThreadException() logs only System.Threading.ThreadExceptionEventArgs, not the exception.

Should pass e.Exception to NLog.Logger.Fatal:

    private static void Application_ThreadException (object sender, ThreadExceptionEventArgs e)
    {
        _logger.Fatal(e.Exception);

Similarly in Program.CurrentDomain_UnhandledException():

    private static void CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e)
    {
        _logger.Fatal(e.ExceptionObject);

3) A small cosmetic issue – text of SearchDialog.buttonRegexHelper button is cut off:

text of SearchDialog.buttonRegexHelper button is cut off

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions