Skip to content

Commit

Permalink
Provide a more descriptive error or warning message when the SCSS or …
Browse files Browse the repository at this point in the history
…CSS file cannot be found.

This should help make the error message more user-friendly for users who do not know the details of how Weaver or WRO is designed.
Such a user need only know that a particular SCSS or CSS file could not be located.
  • Loading branch information
kaladay committed Apr 19, 2022
1 parent 079a593 commit f8725b2
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -121,6 +121,7 @@ public InputStream locate(final String uri) throws IOException {
* The exists() check should not throw an exception when the resource does not exist.
*
* The stack trace is suppressed unless debug is enabled.
* When debug is disabled, a warning message is instead printed.
*
* @param resource The resource to check.
* @param uri The URI represented by the resource (used for error logging).
Expand All @@ -130,7 +131,7 @@ private boolean resourceExists(Resource resource, String uri) {
try {
return resource.exists();
} catch (IllegalArgumentException e) {
String message = "Existence check failed for URI: " + uri;
String message = "Failed to find SCSS or CSS file for the URI: " + uri;
if (LOG.isDebugEnabled()) {
LOG.error(message, e);
} else {
Expand Down

0 comments on commit f8725b2

Please sign in to comment.