| Summary: | Have DAnalysisSessionImpl.doSave() return status of the catched exception during save | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Esteban DUGUEPEROUX <esteban.dugueperoux> |
| Component: | Core | Assignee: | Esteban DUGUEPEROUX <esteban.dugueperoux> |
| Status: | CLOSED FIXED | QA Contact: | Laurent Fasani <laurent.fasani> |
| Severity: | normal | ||
| Priority: | P3 | CC: | laurent.fasani, maxime.porhel, pierre-charles.david |
| Version: | 2.0.0 | Keywords: | triaged |
| Target Milestone: | 3.0.0M7 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/43212 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8bf7b72c5ab56fb559ae5b0078d49f3337548ff0 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 458052 | ||
|
Description
Esteban DUGUEPEROUX
A gerrit to fix that https://git.eclipse.org/r/40042 Fixed as a9bcbef96881c92b485d05856a3dc9f2220371b3 When the save is no in an Exclusive transaction, the TransactionalEditingDomainImpl.runExclusive will put Status.OK_STATUS as status except in case of a rollabck. So the patch provided by Esteban will take this OK_Status whereas we know that something wrong happened. Furtermore, we have lost the error dialog saying that a problem occurred during save. If the user has its error lof view closed, he might no see that his save has failed. org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.performSave(boolean, IProgressMonitor) intercept core exceptions. The Saver could throw something to make the document editor react to the problem. New Gerrit change created: https://git.eclipse.org/r/43212 As the DAnalysis.doSave():IStatus is internal and only used by Saver which doesn't use the returned IStatus, a better fix could be to not catch Throwable and not compute this useless IStatus. I will update the change-set to do that. Scenario to reproduce use case of comment 3 : 1. Have an opened diagram 2. Have a SavingPolicy which throw a NPE 3. Save from the diagram editor 4. We should have a popup displaying the error coming from WorkbenchErrorHandler.handle() The use of IStatus from DAnalysisSessionImpl.doSave() is useless to support this scenario. But there is yet the issue of session status : the session is sync after a failing save. Gerrit change https://git.eclipse.org/r/43212 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8bf7b72c5ab56fb559ae5b0078d49f3337548ff0 Fixed with 8bf7b72c5ab56fb559ae5b0078d49f3337548ff0 technical issue tested with DAnalysisSessionTests.testSaveSessionWithErrorDuringSave() Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0. |