eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[es2as] UML2AS accumulates imprecise errors that get lost. #1520

Closed eclipse-ocl-bot closed 3 hours ago

eclipse-ocl-bot commented 3 hours ago

| --- | --- | | Bugzilla Link | 467690 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | May 20, 2015 06:37 EDT | | Modified | Sep 09, 2017 13:17 EDT | | See also | 467192, 521977 | | Reporter | Ed Willink |

Description

The UML2AS.error method supports a textual message but no context object. The resulting errors seem to get lost; certainly not observed by JUnit tests.

Redesign so that e.g.

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 28, 2016 01:47

Bug 502352 also describes a bad error scenario.

When an Import EAnnotation is resolved from a generated resource the ES2AS.getBaseURI() may fail. This failure is not put in ASResource.errors, and even if it was, it is not clear how or where a multiplicity of ES2AS queries should report the nested error.

Bug 500089 demonstrated that adding an Exception does not break binary API. Perhaps we should introduce a ParserException on all ES2AS returns.

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 09, 2017 05:55

(In reply to Ed Willink from comment #1)

Perhaps we should introduce a ParserException on all ES2AS returns.

No. Resource.errors is the EMF way. Just need callers to take note.

Bug 521977 adds an UMLOCLEValidator.ASResourceProblems to route ASResource.errors/warnings to appear as the ES validation diagnostics.

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 09, 2017 13:17

Pushed to master for M2.