aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv2012-09-10 12:18:40 +0100
committerMelanie2012-09-10 13:15:32 +0100
commit8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb (patch)
treebda89894ae5d81bc6e55a57e95c28f49cebb0d8d /OpenSim
parentAdjust namespce of FlotsamCache (diff)
downloadopensim-SC_OLD-8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb.zip
opensim-SC_OLD-8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb.tar.gz
opensim-SC_OLD-8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb.tar.bz2
opensim-SC_OLD-8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb.tar.xz
passing in the function name to MOD_Api.ConvertFromLSL for more user-friendly error messages
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index cde2d9f..6809c09 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
254 254
255 object[] convertedParms = new object[parms.Length]; 255 object[] convertedParms = new object[parms.Length];
256 for (int i = 0; i < parms.Length; i++) 256 for (int i = 0; i < parms.Length; i++)
257 convertedParms[i] = ConvertFromLSL(parms[i],signature[i]); 257 convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname);
258 258
259 // now call the function, the contract with the function is that it will always return 259 // now call the function, the contract with the function is that it will always return
260 // non-null but don't trust it completely 260 // non-null but don't trust it completely
@@ -294,7 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
294 294
295 /// <summary> 295 /// <summary>
296 /// </summary> 296 /// </summary>
297 protected object ConvertFromLSL(object lslparm, Type type) 297 protected object ConvertFromLSL(object lslparm, Type type, string fname)
298 { 298 {
299 // ---------- String ---------- 299 // ---------- String ----------
300 if (lslparm is LSL_String) 300 if (lslparm is LSL_String)
@@ -374,14 +374,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
374 (LSL_Vector)plist[i]); 374 (LSL_Vector)plist[i]);
375 } 375 }
376 else 376 else
377 MODError("unknown LSL list element type"); 377 MODError(String.Format("{0}: unknown LSL list element type", fname));
378 } 378 }
379 379
380 return result; 380 return result;
381 } 381 }
382 } 382 }
383 383
384 MODError(String.Format("parameter type mismatch; expecting {0}",type.Name)); 384 MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname));
385 return null; 385 return null;
386 } 386 }
387 387