Exception Report
Exception Report
HANDLING
GROUP 3
Exceptions
An exception is any error condition or unexpected behavior that is
encountered by an executing programs. Exceptions can be thrown of
a fault in your code or in code that you call (sus as a shared library),
unavailable operating system resources, unexpected conditions that
the runtime encounters (such as code that can’t be verified), and so
on. Your application can recover from some of these conditions, but
not from others. Although you can recover from most application
exceptions, you can’t recover from most runtime exceptions.
Exception Common
Base class for all exceptions
None (use a derived class of this exception).
exceptions.
IndexOutOfRangeException Thrown by the runtime Indexing an array outside its valid range:
only when an array is arr[arr.Length+1]
indexed improperly.
ArgumentException Base class for all argument None (use a derived class of this exception).
exceptions.
Module exceptionProg
Sub Main()
Try
Throw New ApplicationException("A custom exception _ is
being thrown here...")
Catch e As Exception
Console.WriteLine(e.Message)
Finally
Console.WriteLine("Now inside the Finally Block")
End Try
Console.ReadKey()
End Sub
End Module