Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backend error being shown by mistake, which was hiding actual result #952

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

rowan-walshe
Copy link
Contributor

@rowan-walshe rowan-walshe commented Oct 27, 2023

When the frontend receives a responses from the backend, it tries to find the file which relates to the message. If it finds a file it then decorate the line with the message, rather than just printing the message to the homeArea as normal.

But there are cases where the file name/line number is found, but the file is not available in the view (e.g. #937), which was causing a backend error message to be erroneously displayed. Now in cases where it doesn't find the file it just prints the message to the homeArea.

This change also simplifies the logic for performing this highlighting, and increases the number of cases it's able to highlight. For example, cases like

raised INTERNAL_EXCEPTIONS.INT_E : show_exception_renaming_view.adb:8
raised CONSTRAINT_ERROR : show_exception_renaming.adb:4

were not previously highlighted, but now are.

Fixes #937

@rowan-walshe
Copy link
Contributor Author

Example of new highlighting:

Before:
image

After:
image

@rowan-walshe rowan-walshe added bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code labels Oct 27, 2023
@rowan-walshe rowan-walshe requested a review from gusthoff October 27, 2023 12:03
@rowan-walshe rowan-walshe self-assigned this Oct 27, 2023
@gusthoff gusthoff merged commit 98ed69b into AdaCore:master Oct 27, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running the Storage Check example does not show the expected exception (see the link below)
2 participants