diff --git a/KodiInterop/KodiInterop/Messages/RpcExitCodes.cs b/KodiInterop/KodiInterop/Messages/RpcExitCodes.cs index 4d846da..4258008 100644 --- a/KodiInterop/KodiInterop/Messages/RpcExitCodes.cs +++ b/KodiInterop/KodiInterop/Messages/RpcExitCodes.cs @@ -7,6 +7,7 @@ namespace Smx.KodiInterop.Messages public enum RpcExitCodes { Success = 0, - ResultNotSerializable = 1 + Error = 1, + ResultNotSerializable = 2 } } diff --git a/csharp/rpc.py b/csharp/rpc.py index 40f3ea1..45d3d3f 100644 --- a/csharp/rpc.py +++ b/csharp/rpc.py @@ -11,6 +11,10 @@ class RPCError: SUCCESS = 0 ERROR = 1 + ''' + eval result is not serializable/representable + this is not an error. it indicates that the result is a complex data type + ''' RESULT_NOT_SERIALIZABLE = 2 @@ -98,12 +102,11 @@ def on_message(data): except TypeError as e: jDict['value'] = None jDict['exit_code'] = RPCError.RESULT_NOT_SERIALIZABLE - jDict['error'] = repr(e) + jsonData = json.dumps(jDict) except Exception as e: jDict['value'] = None jDict['exit_code'] = RPCError.ERROR jDict['error'] = repr(e) - finally: jsonData = json.dumps(jDict) return jsonData