浏览代码

bugtraq: Catch exceptions from bugtraq and show message

Catch all exceptions, and not just IOExceptions, from bugtraq formatter.
If an exception is caught, ignore the bugtraq handling of the commit
message and show the plain message. Way better then not showing anything
just because something broke in bugtraq.
pull/1438/head
Florian Zschocke 1年前
父节点
当前提交
30abff5445
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/main/java/com/gitblit/utils/BugtraqProcessor.java

+ 3
- 3
src/main/java/com/gitblit/utils/BugtraqProcessor.java 查看文件

@@ -155,10 +155,10 @@ public class BugtraqProcessor {
formatter.formatLogMessage(text, new BugtraqOutputHandler(sb));
text = sb.toString();
}
} catch (IOException e) {
logger.error(MessageFormat.format("Bugtraq config for {0} is invalid!", repositoryName), e);
} catch (ConfigInvalidException e) {
logger.error(MessageFormat.format("Bugtraq config for {0} is invalid!", repositoryName), e);
logger.warn("Bugtraq config for {} is invalid!", repositoryName, e);
} catch (Exception e) {
logger.warn("Failed to parse message through Bugtraq.", e);
}

return text;

正在加载...
取消
保存