T
Toni
Hello
I'm a newbie in VB .NET and I'd like to accomplish a (I think) very
simple task.
What I want to do is throw an error message to the user whenever
something happens. The main point is that the message must stop the
code execution, but it sholud not close the application nor show the
classical exception window (the one with JIT compiler information).
That is, I'd like to make something like
Dim L_XMLConfigurationFile As XmlDocument = New XmlDocument
Try
L_XMLConfigurationFile.Load("c:\temp\TestFile.xml")
Catch ex As Exception
MyErrorFunction("The file <TestFile.xml> does not
exists.")
End Try
MessageBox.Show("We got there...")
and I want to get an error window telling the user that the file does
not exists, but I must not allow to continue the program execution.
That is, the program should never get to the MessageBox.Show("We got
there...") line if the file does not exists.
The exception handler mechanism shows a window that allows the user to
continue execution, so it does not fit my needs.
Some languages have an ERROR function that stops the execution where
it is called, and I want just that.
Any ideas?
Thanks,
Toni
I'm a newbie in VB .NET and I'd like to accomplish a (I think) very
simple task.
What I want to do is throw an error message to the user whenever
something happens. The main point is that the message must stop the
code execution, but it sholud not close the application nor show the
classical exception window (the one with JIT compiler information).
That is, I'd like to make something like
Dim L_XMLConfigurationFile As XmlDocument = New XmlDocument
Try
L_XMLConfigurationFile.Load("c:\temp\TestFile.xml")
Catch ex As Exception
MyErrorFunction("The file <TestFile.xml> does not
exists.")
End Try
MessageBox.Show("We got there...")
and I want to get an error window telling the user that the file does
not exists, but I must not allow to continue the program execution.
That is, the program should never get to the MessageBox.Show("We got
there...") line if the file does not exists.
The exception handler mechanism shows a window that allows the user to
continue execution, so it does not fit my needs.
Some languages have an ERROR function that stops the execution where
it is called, and I want just that.
Any ideas?
Thanks,
Toni