flow
flow copied to clipboard
Include the referring source file in error message of missing frontend
Description of the bug
When there is missing frontend file referred in my element annotation in my Java annotation the error message explains what is missing, but not refer to location or file where it was included.
e.g. error message below does not mention Java file:
javax.servlet.ServletException: javax.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException:
Failed to find the following files:
- ./tab-sheet.ts
Locations searched were:
- `/Users/se/IdeaProjects/lit-addon/frontend` in this project
- `META-INF/frontend` in included JARs
- `META-INF/resources/frontend` in included JARs
Please, double check that those files exist. If you use a custom directory for your resource files instead of default `frontend` folder then make sure you it's correctly configured (e.g. set 'vaadin.frontend.frontend.folder' property)
Expected behavior
It would be sufficient to add mention like this in above error message:
Included from @JsModule("./tab-sheet.ts") com.vaadin.MyJava.java like 32.
Minimal reproducible example
Change the content @JsModule
or @CssImport
annotation in any Java element to point to non-existing frontend resource.
Versions
- Vaadin / Flow version: 23.1.6