MCQOPTIONS
Saved Bookmarks
| 1. |
Rimo is handling the exception raised by Nanda and wants to print the appropriate error message and code. Identify the correct catch block |
| A. | catch() { echo getMessage(); echo getCode(); } |
| B. | catch(Exception $e) { echo $e->getMessage(); echo $e->getCode(); } |
| C. | catch(Exception $e) { echo "Message:Uninitialized Variable"; echo "Code:5"; } |
| D. | None of the above |
| Answer» C. catch(Exception $e) { echo "Message:Uninitialized Variable"; echo "Code:5"; } | |