mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 21:16:48 +00:00
feat: adds try catch to devjson execution thread and adds port names for sdi in/out
This commit is contained in:
parent
7bac65002d
commit
5aa1f85df5
2 changed files with 20 additions and 1 deletions
|
|
@ -84,7 +84,18 @@ namespace PepperDash.Essentials.Core
|
|||
.Select((p, i) => ConvertType(action.Params[i], p.ParameterType))
|
||||
.ToArray();
|
||||
|
||||
Task.Run(() => method.Invoke(obj, convertedParams));
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Calling method {methodName} on device {deviceKey}", null, method.Name, action.DeviceKey);
|
||||
method.Invoke(obj, convertedParams);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "Error invoking method {methodName} on device {deviceKey}", null, method.Name, action.DeviceKey);
|
||||
}
|
||||
});
|
||||
|
||||
CrestronConsole.ConsoleCommandResponse("Method {0} successfully called on device {1}", method.Name,
|
||||
action.DeviceKey);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue