In the following example, if the class does not exist, I want to catch the error and create a Null class instead.
Null
But in spite of my try/catch statement
php >= 7.0
php can catch 'class not found' as Throwable
try { return new $className($smartFormIdCode); } catch (\Throwable $ex) { return new SmartFormNull($smartformIdCode); }