Fix PHPCS And JError

Fix up to use Exceptions