catch (ex as exception)
throw new Exception("[process01]" & ex.message)
catch (ex as Exception)
throw new Exception("[process02]" & ex.Message())
Public Sub Main(ByVal args() As String)
catch (ex As Exception)
In the example above, if an error happens in Process2, it will be thrown upwards until it reaches the main subroutine. So when you see the error message, you know that the error was encountered in Process2. You will then see the error as
I found this makes it easier to zoom into the errors in my application. This concept can be used in Console applications, Web Applications and Windows Application. Just need to make sure that the message is displayed somewhere.