Mantis#1459. Thank you kindly, CMickeyb for a patch that:

the function that reports errors in event handling is not computing the 
line numbers correctly for windows paths (and probably linux paths). 
As a result, the conversion to int throws an exception.
note... i'm not sure why we extract the line number, convert it to an int, 
then convert it back to a string... but hey... :-)
0.6.0-stable
Charles Krinke 2008-06-05 19:30:35 +00:00
parent 901b9365ba
commit d66de83938
1 changed files with 5 additions and 2 deletions

View File

@ -302,11 +302,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
int idx=t.IndexOf("SecondLife.Script.");
if (idx != -1)
{
int colon=t.IndexOf(":");
// Need to skip past windows paths that have "c:\" in them
int colon=t.LastIndexOf(":");
if (-1 != colon)
{
line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString();
// Not sure why this is converted to an int then back to a string, either
// way, need to skip the word "line " in the substring
line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString();
break;
}
}