chore: message handling

This commit is contained in:
Nathan Walker
2021-03-01 14:27:25 -08:00
parent 2f81d606fc
commit d88cef3b48
2 changed files with 4 additions and 2 deletions

View File

@ -103,7 +103,7 @@ export function loadAppCss(): void {
}); });
} catch (e) { } catch (e) {
if (Trace.isEnabled()) { if (Trace.isEnabled()) {
Trace.write(`The app CSS file ${getCssFileName()} couldn't be loaded!`, Trace.categories.Style, Trace.messageType.error); Trace.write(`The app CSS file ${getCssFileName()} couldn't be loaded!`, Trace.categories.Style, Trace.messageType.warn);
} }
} }
} }

View File

@ -114,7 +114,9 @@ class CSSSource {
return CSSSource.fromDetect(cssOrAst, keyframes, resolvedModuleName); return CSSSource.fromDetect(cssOrAst, keyframes, resolvedModuleName);
} }
} catch (e) { } catch (e) {
Trace.write(`Could not load CSS from ${uri}: ${e}`, Trace.categories.Error, Trace.messageType.error); if (Trace.isEnabled()) {
Trace.write(`Could not load CSS from ${uri}: ${e}`, Trace.categories.Error, Trace.messageType.warn);
}
} }
return CSSSource.fromFile(appRelativeUri, keyframes); return CSSSource.fromFile(appRelativeUri, keyframes);