diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 7fc8759..c2ec5b4 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -130,10 +130,18 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
130 | 130 | ||
131 | public void RegisterScriptInvocation(object target, string meth) | 131 | public void RegisterScriptInvocation(object target, string meth) |
132 | { | 132 | { |
133 | MethodInfo mi = target.GetType()..GetMethod(meth, | 133 | m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}",meth,target.GetType().Name); |
134 | |||
135 | |||
136 | MethodInfo mi = target.GetType().GetMethod(meth, | ||
134 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | 137 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); |
138 | if (mi == null) | ||
139 | { | ||
140 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); | ||
141 | return; | ||
142 | } | ||
143 | |||
135 | Type delegateType; | 144 | Type delegateType; |
136 | |||
137 | var typeArgs = mi.GetParameters() | 145 | var typeArgs = mi.GetParameters() |
138 | .Select(p => p.ParameterType) | 146 | .Select(p => p.ParameterType) |
139 | .ToList(); | 147 | .ToList(); |
@@ -197,6 +205,8 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
197 | return "modInvokeR"; | 205 | return "modInvokeR"; |
198 | else if (sid.ReturnType == typeof(object[])) | 206 | else if (sid.ReturnType == typeof(object[])) |
199 | return "modInvokeL"; | 207 | return "modInvokeL"; |
208 | |||
209 | m_log.WarnFormat("[MODULE COMMANDS] failed to find match for {0} with return type {1}",fname,sid.ReturnType.Name); | ||
200 | } | 210 | } |
201 | } | 211 | } |
202 | 212 | ||