G
Guest
Hi
In Try-Catch we can trap the error in run-time with err.number or err.description
But some errors like "File not exist", "Device not ready", ect... are taken over by the system before come into Try-Catch
I have a code like this
-----------
1. If OpenFileDialog1.ShowDialog() = DialogResult.Cancel The
2. Exit Su
3. End I
4
5. If OpenFileDialog1.FileName <> "" The
6. Tr
7. FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input
8. Catc
9. MsgBox(Err.Number & " - " & Err.Description
10. End Tr
11. End I
---------
When the OpenFileDialog windows appeared, I inputed a filename that doesn't exist
The message windows from the system appeared directly
" (file name).......... does not exist
Please verify that the correct file name was given.
This message appear before the process come into Try-Catch. I know it because I put a break point at line 1
I know that I have to set something somewhere in Debug Menu
But I don't know How and Where
Can somebody tell me how to do it ? Please
Regards
Joachi
In Try-Catch we can trap the error in run-time with err.number or err.description
But some errors like "File not exist", "Device not ready", ect... are taken over by the system before come into Try-Catch
I have a code like this
-----------
1. If OpenFileDialog1.ShowDialog() = DialogResult.Cancel The
2. Exit Su
3. End I
4
5. If OpenFileDialog1.FileName <> "" The
6. Tr
7. FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input
8. Catc
9. MsgBox(Err.Number & " - " & Err.Description
10. End Tr
11. End I
---------
When the OpenFileDialog windows appeared, I inputed a filename that doesn't exist
The message windows from the system appeared directly
" (file name).......... does not exist
Please verify that the correct file name was given.
This message appear before the process come into Try-Catch. I know it because I put a break point at line 1
I know that I have to set something somewhere in Debug Menu
But I don't know How and Where
Can somebody tell me how to do it ? Please
Regards
Joachi