From 4e552ae5b2c98d96b0df1a3f92bfb6f4aa22b1f0 Mon Sep 17 00:00:00 2001 From: IrinaMalysheva Date: Fri, 18 Jun 2021 14:22:13 +0300 Subject: [PATCH] More messages for /revision errors. --- Web/App_Code/DebugInfo.cs | 4 ++++ Web/App_Code/RevisionHandler.cs | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Web/App_Code/DebugInfo.cs b/Web/App_Code/DebugInfo.cs index 8ba64204c..6e481f1ff 100644 --- a/Web/App_Code/DebugInfo.cs +++ b/Web/App_Code/DebugInfo.cs @@ -57,6 +57,10 @@ public class DebugInfo } } + if (!File.Exists(ChangeLogFilePath)) { + return "changelog.xml doesn't exist"; + } + var ChangeLogPatternFilePath = Path.Combine(basePath, TemplateName); var xmlLog = new XmlDocument(); diff --git a/Web/App_Code/RevisionHandler.cs b/Web/App_Code/RevisionHandler.cs index 9cca99912..48f1583cc 100644 --- a/Web/App_Code/RevisionHandler.cs +++ b/Web/App_Code/RevisionHandler.cs @@ -12,15 +12,17 @@ namespace TeamLab.HttpHandlers get { return false; } } + public string result; + public void ProcessRequest(HttpContext context) { var DebugString = DebugInfo.DebugString; - string result = "result's empty"; if (!String.IsNullOrEmpty(DebugString)) { result = DebugString; } - else { + else + { if (DebugString == null) { result = "DebugString's null"; @@ -30,6 +32,10 @@ namespace TeamLab.HttpHandlers result = DebugInfo.GetStaticDebugString(); } } + if (result == String.Empty) + { + result = "result's empty"; + } context.Response.Write(result); } }