Raise some IO associated Exception logging in XEngine to error level, in line with other similar cases.

Remove more unnecessary Close() calls - these are being triggered by the Dispose() called when exiting the using statement for these sdk io objects.
0.7.4.1
Justin Clark-Casey (justincc) 2012-06-20 00:19:50 +01:00
parent 0fa303b1cf
commit 881e92a726
1 changed files with 5 additions and 7 deletions

View File

@ -1715,14 +1715,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
FileMode.Open, FileAccess.Read)) FileMode.Open, FileAccess.Read))
{ {
tfs.Read(tdata, 0, tdata.Length); tfs.Read(tdata, 0, tdata.Length);
tfs.Close();
} }
assem = new System.Text.ASCIIEncoding().GetString(tdata); assem = new System.Text.ASCIIEncoding().GetString(tdata);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.DebugFormat("[XEngine]: Unable to open script textfile {0}, reason: {1}", assemName+".text", e.Message); m_log.ErrorFormat(
"[XEngine]: Unable to open script textfile {0}{1}, reason: {2}",
assemName, ".text", e.Message);
} }
} }
} }
@ -1739,16 +1740,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read)) using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read))
{ {
fs.Read(data, 0, data.Length); fs.Read(data, 0, data.Length);
fs.Close();
} }
assem = System.Convert.ToBase64String(data); assem = System.Convert.ToBase64String(data);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.DebugFormat("[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); m_log.ErrorFormat(
"[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message);
} }
} }
} }
@ -1761,9 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
using (StreamReader msr = new StreamReader(mfs)) using (StreamReader msr = new StreamReader(mfs))
{ {
map = msr.ReadToEnd(); map = msr.ReadToEnd();
msr.Close();
} }
mfs.Close();
} }
} }