Public Class Form1 Private Sub ThrowsExceptions() Throw New System.Exception("Exception Thrown") 'Line 3 End Sub Private Sub JustThrowIT() Try ThrowsExceptions() Catch ex As Exception Throw 'Line 9 End Try End Sub Private Sub ThrowEX() Try ThrowsExceptions() Catch ex As Exception Throw ex 'Line 16 End Try End Sub Private Sub ThrowEX_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Try ThrowEX() 'Line 21 Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub Private Sub JustThrowIt_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Try JustThrowIT() 'Line 29 Catch ex As Exception MessageBox.Show(ex.ToString) End Try End SubEnd Class
When you click the Throw ex button you get only get references to two lines 16 and 21 the orginal line the exception is thrown is missing(line 3).
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.