From ad903f1b7b8b75a6914c4e26bf08313e482c9072 Mon Sep 17 00:00:00 2001 From: Dalien Talbot Date: Sat, 15 Sep 2007 14:52:53 +0000 Subject: Prevent the crash due to exception in system ReadLine that I saw today during loadtesting. --- OpenSim/Framework/Console/LogBase.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index e5025e0..67440f6 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs @@ -302,9 +302,14 @@ namespace OpenSim.Framework.Console public string ReadLine() { - string TempStr = System.Console.ReadLine(); - Log.WriteLine(TempStr); - return TempStr; + try { + string TempStr = System.Console.ReadLine(); + Log.WriteLine(TempStr); + return TempStr; + } catch (Exception e) { + MainLog.Instance.Error("Console", "System.Console.ReadLine exception " + e.ToString()); + return ""; + } } public int Read() -- cgit v1.1