<?php
/**
* You can catch exceptions thrown in a deep level function
*/
function employee()
{
throw new \Exception("I am just an employee !");
}
function manager()
{
employee();
}
function boss()
{
try {
manager();
} catch (\Exception $e) {
echo $e->getMessage();
}
}
boss(); // output: "I am just an employee !"