Ok, we don't do this due to having lots of legacy code, but its better to throw a PHP exception than use JError as raiseWarning etc is now deprecated