Skip to content

Commit

Permalink
VACMS-16888: Adds exception handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
omahane committed Mar 3, 2025
1 parent 93ce056 commit a9143f7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docroot/modules/custom/va_gov_migrate/src/Commands/Commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ public function cleanRevs() {
*
* @command va_gov_migrate:archive-intranet-only-forms
* @aliases va-gov-archive-intranet-only-forms
*
* @throws League\Csv\UnavailableStream
* Thrown when the file is not available.
* @throws League\Csv\Exception
* Thrown if the offset is a negative integer.
* @throws League\Csv|InvalidArgument
* Thrown by enclosure or delimiter arguments are more than one character.
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* Thrown if the entity type doesn't exist.
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
* Thrown if the storage handler couldn't be loaded.
*/
public function archiveIntranetOnlyForms() {
$csv = Reader::createFromPath(DRUPAL_ROOT . '/sites/default/files/migrate_source/va_forms_data.csv', 'r');
Expand Down

0 comments on commit a9143f7

Please sign in to comment.