is there any way to figure out what these generic vb.net error messages mean?
Application has generated an exception that could not be handled
Process id=Oxaa(170), Thread id=Oxbe (190)
Printable View
is there any way to figure out what these generic vb.net error messages mean?
Application has generated an exception that could not be handled
Process id=Oxaa(170), Thread id=Oxbe (190)
Try inspecting the StackTrace of the exception object that gets thrown. That should have more information with it including the file and line number that caused the error.
the app thats having the problem is on a user machine. Would I have to recompile then update the exe?
It's strange, I have the app installed on a bunch of NT boxes all working fine, but on this one when the user goes to close out of the app they get the exception err msg?
Yes to make use of the StackTrace you'd need to add more error handling in your code and recompile. The only thing I can think of without a recompile is MAYBE something with adding TraceListeners into the config file. I haven't actually tried that yet, but it may work.
I'm getting the error message on the close event. All I have in that event is END. Do you know where else I can debug and place some error trapping in?
If you start the app from a sub main then you can wrap that in a try..catch to catch anything not caught in the rest of the app.
VB Code:
Public Module Starter Public Sub Main() Try Application.Run(New Form1) Catch Ex As Exception MsgBox(Ex.StackTrace, MsgBoxStyle.Critical, Ex.Message) End Try End Sub End Module
I was told iin another posting that using End was very harsh on an apllication and to use Appplication.exit instead
I'm not saying that is the solution, but it's a simple change to make and try
Other than that try what Edenis posted, the only problem I've found with the stack trace, is it only gives the code execution list and so if you already know where it fails does no thelp you that much