This is an automated email from the ASF dual-hosted git repository.
snoopdave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git
The following commit(s) were added to refs/heads/master by this push:
new 31974886f Don't log an error when a weblog's theme has no stylesheet
(#289)
31974886f is described below
commit 31974886ffe599f63612cf163270eb9e1691aa5a
Author: Matt Raible <[email protected]>
AuthorDate: Sun Nov 15 18:50:28 2026 -0700
Don't log an error when a weblog's theme has no stylesheet (#289)
StylesheetEdit threw and logged an exception with a stack trace each time
the Stylesheet page opened for a shared theme without a stylesheet, which the
page already explains to the user. It now logs that at debug level; real lookup
failures still log an error.
---
.../apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
index 1dcc80ef8..52414b2ea 100644
---
a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
+++
b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
@@ -89,8 +89,11 @@ public class StylesheetEdit extends UIAction {
stylesheet = getActionWeblog().getTheme().getStylesheet();
}
- if(stylesheet == null) {
- throw new WebloggerException("no stylesheet found");
+ if (stylesheet == null) {
+ // not every theme has a stylesheet, and the page explains
that,
+ // so this is not an error
+ log.debug("No stylesheet in the theme of weblog " +
getActionWeblog().getHandle());
+ return;
}
WeblogManager weblogManager =
WebloggerFactory.getWeblogger().getWeblogManager();