2080 8

BIT301 ยท 2080 ยท 5 marks

Write a PHP program to illustrate the use of exception handling.

Write a PHP program to illustrate the use of exception handling. [5]

Web Technology IIChapter 10: Sessions, Cookies, and Error HandlingException handling and try catch

Exception handling lets a script deal with a runtime failure at the place that knows what to do about it, instead of letting the failure end the request. The code that might fail goes inside try, throw raises an object describing the failure, one or more catch blocks handle it, and an optional fi...