Public Class TempIsZeroException : Inherits ApplicationException
Public Sub New(ByVal message As String)
Dim temperature As Integer = 0
If (temperature = 0) Then
Throw (New TempIsZeroException("Zero Temperature found"))
Console.WriteLine("Temperature: {0}", temperature)
Dim temp As New Temperature()
Catch e As TempIsZeroException
Console.WriteLIne("TempIsZeroException: {0}", e.Message)