Scenario: I have a class that extends another class, yet the parent class is undefined (for whatever reason). I am trying to get a ReflectionClass of the child class. When I do this, I get a Class Not Found exception on the parent class. However, I cannot catch this exception. What am I doing wrong?
For example...
<?php
class Foo extends Bar { }
try
{
$class = new ReflectionClass('Foo');
echo 'I\'ve reflected "Foo" successfully!';
}
catch (Exception $e)
{
echo 'My exception handler';
}
The result of the above code is a printout of the class 'Bar' not found exception. Why is my catch statement not picking up the exception?
thanks, Kyle