Add new error case
[mono.git] / mcs / btests / ExceptionHandlingC5.vb
1 REM LineNo: 13\r
2 REM ExpectedError: BC30754\r
3 REM ErrorMessage: 'Goto label1' is not valid because 'label1' is inside a 'Try',\r
4 REM               'Catch' or 'Finally' statement that does not contain this statement.\r
5 \r
6 Imports System\r
7 \r
8 Module ExceptionHandlingC5\r
9     Dim i As Integer\r
10     Sub Main()\r
11         Dim i As Integer = 0\r
12 \r
13         GoTo label1\r
14 \r
15         Try\r
16             i = 1 / i\r
17 label1:     ' do something here\r
18             i = 2 * i\r
19             GoTo label2\r
20         Catch e As Exception\r
21 label2:\r
22             Console.WriteLine("Exception in Main: " & e.Message)\r
23             GoTo label3\r
24         Finally\r
25 label3:\r
26             i = i + 2\r
27         End Try\r
28     End Sub\r
29 \r
30 End Module