Development VB.Net

Imports System
Public Class MainClass
    
    Shared Sub Main(ByVal args As String())
        On Error Resume Next
        DoSomething()
        If Err.Number <> 0 Then
            Console.WriteLine("Error in DoSomething")
            Exit Sub
        End If
        DoSomethingElse()
        If Err.Number <> 0 Then
            Console.WriteLine("Error in DoSomethingElse")
            Exit Sub
        End If
    End Sub
    Shared Private Sub DoSomething()
            Throw New ArgumentException("Error in subroutine DoSomething")
    End Sub
    Shared Private Sub DoSomethingElse()
            Throw New ArgumentException("Error in subroutine DoSomethingElse")
    End Sub
End Class