sudhaus7 / typo3-xlsimport

MIT License
4 stars 9 forks source link

[TASK] Code cleanup on Exception imports #38

Open calien666 opened 8 months ago

calien666 commented 8 months ago
          Which `Exception` is here meant ?

I would suggest to state here always the full namespace for exception - or use proper use alias if some overlappings are happening.

And if the php root exception is meant, use \Exception for it.

Example for use aliasing:

use Doctrine\DBAL\Driver\Exception as DoctrineDriverException;
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
use SomeVendor\Exception as SomeVendorException;
use TYPO3\CMS\Core\Exception as Typo3Exception;

and than use these directly in the throw tags

    /**
     * @throws \TYPO3\CMS\Core\Exception
     * @throws DBALException
     * @throws DoctrineDriverException
     * @throws AccessDeniedTableModifyException
     * @throws Exception
     */

same for all other tags and exception classes - will not commet this on each usage for now.

_Originally posted by @sbuerk in https://github.com/sudhaus7/typo3-xlsimport/pull/35#discussion_r1451817536_