Search results for query: *

  1. M

    Logging unhandled exceptions in a Windows Application to file

    First of all may thank the contributors of this thread. On further examination of the code, there are indeed a try catch block, where the result is effectively discarded. But I could see the exception in the Visual Studio Output tab window, hence the confusion. In other words these are not...
  2. M

    Logging unhandled exceptions in a Windows Application to file

    If I create an unhandled divide by zero exception in either the Application or the dlls then this is caught by CurrentDomain_UnhandledException() This will also terminate the Application. If I create the following: System.InvalidOperationException HResult=0x80131509 Message=Image added to...
  3. M

    Logging unhandled exceptions in a Windows Application to file

    No, the form is loaded but the list of thumbnails is being populated. The exception occurs when a ImageList has a null image added. The exception is unintentional, however it's a good example for where future logging would come in very useful for bug in the field.
  4. M

    Logging unhandled exceptions in a Windows Application to file

    Many thanks for the reply. It is a 64 bit system and Visual Studio Output windows says: Exception thrown: 'System.InvalidOperationException' in System.Windows.Forms.dll If I compile to x86 CPU there's no change. Is this a system limitation? I suppose all I want is the ability to pipe the...
  5. M

    Logging unhandled exceptions in a Windows Application to file

    Many thanks for the replies. I have moved to .Net 4.8 as suggested with no drama. I added the following to Main() AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledException); Application.ThreadException += new...
  6. M

    Logging unhandled exceptions in a Windows Application to file

    Please be gentle to a C# newbie in Visual Studio. I have been handed a Windows Forms application using .Net 4.6 and has 3 namespaces, two of which are dll Class Libraries. I have looked at NLog and gone some way down the path with tutorials and examples. However it seems easy to output handled...
Back
Top Bottom