Skip to content

[2042] Improve error reporting while uploading a document#2044

Open
adaussy wants to merge 1 commit intoeclipse-syson:mainfrom
adaussy:ada/fix/2042
Open

[2042] Improve error reporting while uploading a document#2044
adaussy wants to merge 1 commit intoeclipse-syson:mainfrom
adaussy:ada/fix/2042

Conversation

@adaussy
Copy link
Contributor

@adaussy adaussy commented Mar 10, 2026

Bug: #2042

PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW

Auto review

  • Have you reviewed this PR? Please do a first quick review, It is very useful to detect typos and missing copyrights, check comments, check your code... The reviewer will thank you for that :)

Project management

  • Has the pull request been added to the relevant milestone?
  • Have the priority: and pr: labels been added to the pull request? (In case of doubt, start with the labels priority: low and pr: to review later)
  • Have the relevant issues been added to the pull request?
  • Have the relevant labels been added to the issues? (area:, type:)
  • Have the relevant issues been added to the same project milestone as the pull request?

Changelog and release notes

  • Has the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc been updated to reference the relevant issues?
  • Have the relevant API breaks been described in the CHANGELOG.adoc?
  • Are the new / upgraded dependencies mentioned in the relevant section of the CHANGELOG.adoc?
  • In case of a change with a visual impact, are there any screenshots in the doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • In case of a key change, has the change been added to Key highlights section in doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?

Documentation

  • Have you included an update of the documentation in your pull request? Please ask yourself if an update (installation manual, user manual, developer manual...) is needed and add one accordingly.

Tests

  • Is the code properly tested? Any pull request (fix, enhancement or new feature) should come with a test (or several). It could be unit tests, integration tests or cypress tests depending on the context. Only doc and releng pull request do not need for tests.

@adaussy adaussy marked this pull request as draft March 10, 2026 13:43
@AxelRICHARD AxelRICHARD modified the milestone: 2026.3.0 Mar 10, 2026
@AxelRICHARD AxelRICHARD linked an issue Mar 10, 2026 that may be closed by this pull request
@adaussy adaussy marked this pull request as ready for review March 10, 2026 14:12
assertTrue(optExternalResourceLoadingResult.isPresent());

if (!this.expectedErrorMessages.isEmpty()) {
LoadingReport report = (LoadingReport) optExternalResourceLoadingResult.get().loadingReport();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optExternalResourceLoadingResult.get() is already affected to a variable below. Please use this variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

System.err.println("Error while parsing input file : " + errorMessage);
AstParsingResult astResult = sysmlToAst.convert(inputStream, "sysml");


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless empty line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

.collect(Collectors.joining(System.lineSeparator(), System.lineSeparator(), System.lineSeparator()));
System.err.println("Error while parsing input file : " + errorMessage);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless empty line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

private List<Element> convert(InsertTextualSysMLv2Input insertTextualInput, IEMFEditingContext emfEditingContext, ASTTransformer tranformer, Element parentElement) {
private List<Element> convert(InsertTextualSysMLv2Input insertTextualInput, IEMFEditingContext emfEditingContext, ASTTransformer tranformer, Element parentElement, List<Message> messages) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tranformer => transformer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

CHANGELOG.adoc Outdated
- https://github.com/eclipse-syson/syson/issues/2032[#2032] [export] Fix NPE when exporting `LiteralString`.
- https://github.com/eclipse-syson/syson/issues/2037[#2037] [export] Backslashes need to be escaped during textual export in `LiteralString`.
- https://github.com/eclipse-syson/syson/issues/2039[#2039] [import] Import should unescape backslash in `LiteralString`.
- https://github.com/eclipse-syson/syson/issues/2042[#2042] [import] Improve error reporting while uploading a document.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it is in Bug fixes section ? Improvements seems more appropriate

Bug: eclipse-syson#2042
Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error reporting while uploading a document

2 participants