summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MarkdownPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoryPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SummaryPage.java4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
index 5aa80294..188a5b4b 100644
--- a/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
@@ -16,7 +16,6 @@
package com.gitblit.wicket.pages;
import java.text.MessageFormat;
-import java.text.ParseException;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
@@ -60,7 +59,8 @@ public class MarkdownPage extends RepositoryPage {
String htmlText;
try {
htmlText = MarkdownUtils.transformMarkdown(markdownText);
- } catch (ParseException p) {
+ } catch (Exception e) {
+ logger.error("failed to transform markdown", e);
markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
htmlText = StringUtils.breakLinesForHtml(markdownText);
}
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
index e5ce22a1..dabaed03 100644
--- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -75,7 +75,7 @@ import com.gitblit.wicket.panels.RefsPanel;
public abstract class RepositoryPage extends RootPage {
- private final Logger logger = LoggerFactory.getLogger(getClass());
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
private final String PARAM_STAR = "star";
diff --git a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
index 00d77a4e..cc9697c6 100644
--- a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
@@ -18,7 +18,6 @@ package com.gitblit.wicket.pages;
import java.awt.Color;
import java.awt.Dimension;
import java.text.MessageFormat;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@@ -166,7 +165,8 @@ public class SummaryPage extends RepositoryPage {
markdownText = JGitUtils.getStringContent(r, head.getTree(), readme, encodings);
htmlText = MarkdownUtils.transformMarkdown(markdownText);
}
- } catch (ParseException p) {
+ } catch (Exception e) {
+ logger.error("failed to transform markdown", e);
markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
htmlText = StringUtils.breakLinesForHtml(markdownText);
}