From 3d984ca1f6253f02f2271abd9b7577c372cde64a Mon Sep 17 00:00:00 2001 From: eeichinger Date: Wed, 14 Oct 2009 06:08:08 +0000 Subject: [PATCH] slashdoc improvement better stack reporting in case WebApplicationContext cannot be created --- .../Spring.Web/Context/Support/WebApplicationContext.cs | 8 ++++---- test/Spring/Spring.Core.Tests/StopWatch.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs index 7e7491e9..ec788793 100644 --- a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs +++ b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs @@ -44,7 +44,7 @@ namespace Spring.Context.Support { /// /// Web application context, taking the context definition files - /// from the file system or from URLs. + /// from the file system or from URLs. /// /// Treats resource paths as web resources, when using /// IApplicationContext.GetResource. Resource paths are considered relative @@ -129,7 +129,7 @@ namespace Spring.Context.Support static WebApplicationContext() { ILog s_weblog = LogManager.GetLogger(typeof(WebApplicationContext)); - + // register for ContextRegistry.Cleared event - we need to discard our cache in this case ContextRegistry.Cleared += new EventHandler(OnContextRegistryCleared); @@ -229,7 +229,7 @@ namespace Spring.Context.Support ILog s_weblog = LogManager.GetLogger(typeof(WebApplicationContext)); bool isLogDebugEnabled = s_weblog.IsDebugEnabled; - + lock (s_webContextCache) { if (isLogDebugEnabled) @@ -296,7 +296,7 @@ namespace Spring.Context.Support { if (s_weblog.IsErrorEnabled) { - s_weblog.Error(string.Format("failed creating context '{0}'", contextName), ex); + s_weblog.Error(string.Format("failed creating context '{0}', Stacktrace:\n{1}", contextName, new StackTrace()), ex); } #if NET_1_1 if (ConfigurationUtils.IsConfigurationException(ex)) diff --git a/test/Spring/Spring.Core.Tests/StopWatch.cs b/test/Spring/Spring.Core.Tests/StopWatch.cs index f2a43563..f0242ebb 100644 --- a/test/Spring/Spring.Core.Tests/StopWatch.cs +++ b/test/Spring/Spring.Core.Tests/StopWatch.cs @@ -68,7 +68,7 @@ namespace Spring /// /// Starts the timer and returns and "handle" that must be disposed to stop the timer. /// - /// the output format string, that is used to render the result message + /// the output format string, that is used to render the result message. Use '{0}' to print the elapsed timespan. /// the handle to dispose for stopping the timer public IDisposable Start(string outputFormat) {