Exception Information : Exception Message « Development « VB.Net






Exception Information

Exception Information
Imports System

Public Class MainClass
    
    Shared Sub Main(ByVal args As String())
        Try
            CalculateValue()
        Catch ex As Exception
            Console.WriteLine( "ex.Message:" & ex.Message )
            Console.WriteLine( "ex.StackTrace:" & ex.StackTrace )
            Console.WriteLine( "ex.ToString:" & ex.ToString )
        End Try

    End Sub
    
    Shared Private Function CalculateValue() As Integer
        Return 1 \ Integer.Parse("0")
    End Function

End Class

           
       








Related examples in the same category

1.Display Exception, Inner Exception and stack traceDisplay Exception, Inner Exception and stack trace
2.Exception Help Link, Message and TraceException Help Link, Message and Trace
3.Customize Exception InformationCustomize Exception Information