mirror of
https://github.com/opensim/opensim.git
synced 2026-05-17 04:05:40 +08:00
Mantis#1910. Thank you kindly, HomerHorwitz for a patch that:
In case you run the server with mono --debug OpenSim.exe line numbers are reported as <filename>:<linenumber>, so no "at line" is found. That led to an exception, which is caught since r5766. The attached patch fixes this for mono;
This commit is contained in:
@@ -319,7 +319,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||
// way, need to skip the word "line " in the substring
|
||||
try
|
||||
{
|
||||
line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString();
|
||||
// ...if it is there. With mono --debug OpenSim.exe,
|
||||
// you'll get the error in the format filename:linenumber
|
||||
if(colon + 6 < t.Length && t.Substring(colon + 1, 5).Equals("line ")) colon += 6;
|
||||
else ++colon; // else only skip the colon
|
||||
line = " at line " + Convert.ToInt32(t.Substring(colon)).ToString();
|
||||
}
|
||||
catch (ArgumentOutOfRangeException e2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user