ok so everyone knows the thing with autoload it doesn't allow you to throw exceptions in the any the autoload function or any function you define as your autoload function.... the only solution i really know of is use eval(). I was wondering what other solutions do you guys use to overcome this inconvenience? is eval the best way?
code example
spl_autoload_register(array('Loader' , 'Load'));
class Loader
{
function Load($classname)
{
if(!file_exits($classname)
{
eval('classname' , $classname , '{}');
throw new Exception('exception');
}
}
}