Add exception messages for exceptional inconsistencies cases.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-31 13:43:28 -04:00
parent c919eba3d7
commit a378a779dd
4 changed files with 29 additions and 18 deletions

View File

@@ -169,7 +169,10 @@ class GranularImporter
}
}
} catch (\Exception $e) {
throw $e;
$exception = new ImportException('Please review your current process definition
for missing elements, it\'s recommended that a new process should be exported
with all the elements.');
throw $exception;
}
}
@@ -186,7 +189,7 @@ class GranularImporter
if ($generateUid) {
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
$exception = new ImportException();
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_NON_EXISTENT'));
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_INCOMPLETE'));
throw($exception);
}
}