X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.suite.workbench.rap%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fworkbench%2Fcommands%2FImportEntities.java;h=1771486a85d71d8d8bb553d88c132090d55d8712;hp=931e53e74a67047d37c27c6c5bbcb46a398876aa;hb=4186dac38affdaff2550aef65fbc37fe3463c3ff;hpb=af39ff3a4bc323a108259dc068b91f931c5c69cf diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java index 931e53e..1771486 100644 --- a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java +++ b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java @@ -41,7 +41,7 @@ import org.argeo.people.PeopleService; import org.argeo.people.PeopleTypes; import org.argeo.people.util.PeopleJcrUtils; import org.argeo.people.util.PersonJcrUtils; -import org.argeo.suite.SuiteException; +import org.argeo.suite.workbench.SuiteWorkbenchException; import org.argeo.suite.workbench.AsUiPlugin; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; @@ -130,7 +130,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { userInputPage = new UserInputPage("User input page"); addPage(userInputPage); } catch (Exception e) { - throw new SuiteException("Cannot add page to wizard", e); + throw new SuiteWorkbenchException("Cannot add page to wizard", e); } } @@ -147,7 +147,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { else if (PeopleTypes.PEOPLE_PERSON.equals(type)) importDefaultPersonFile(in); } catch (IOException e) { - throw new SuiteException("Cannot import mapping file", e); + throw new SuiteWorkbenchException("Cannot import mapping file", e); } finally { IOUtils.closeQuietly(in); } @@ -400,7 +400,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { resourcesService.refreshKnownTags(mlParent); } catch (PeopleException | RepositoryException e) { - throw new SuiteException("Cannot import mapping file, error at line: " + (i + 1), e); + throw new SuiteWorkbenchException("Cannot import mapping file, error at line: " + (i + 1), e); } finally { JcrUtils.logoutQuietly(session); } @@ -518,7 +518,6 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { PeopleJcrUtils.createContact(resourcesService, peopleService, tmpPerson, PeopleTypes.PEOPLE_MAIL, value, false, ContactValueCatalogs.CONTACT_CAT_MAIN, null); - } } @@ -571,7 +570,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { String message = "Cannot import mapping file, error at line: " + (i + 1); // TODO Check why the error is swallowed. log.error(message, e); - throw new SuiteException(message, e); + throw new SuiteWorkbenchException(message, e); } finally { JcrUtils.logoutQuietly(session); }