Prevent the crash due to exception in system ReadLine that I saw today

during loadtesting.
afrisby
Dalien Talbot 2007-09-15 14:52:53 +00:00
parent ed68a3894c
commit ad903f1b7b
1 changed files with 8 additions and 3 deletions

View File

@ -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()