4 * Created on: Apr 4, 2017
10 internal static partial class Interop
13 private const string LogTag = "Tizen.Security.Libteec";
14 internal enum LibteecError : uint
17 NotImplemented = 0xFFFF0009,
18 CommunicationFailed = 0xFFFF000E,
21 internal static void CheckNThrowException(int err, string msg)
25 case (uint)LibteecError.None:
27 case (uint)LibteecError.NotImplemented:
28 throw new NotImplementedException(string.Format("[{0}] {1} error=0x{2}",
29 LogTag, msg, err.ToString("X")));
30 case (uint)LibteecError.CommunicationFailed:
31 throw new Exception(string.Format("[{0}] {1} error=0x{2}",
32 LogTag, msg, err.ToString("X")));
34 throw new InvalidOperationException(string.Format("[{0}] {1}, error=0x{2}",
35 LogTag, msg, err.ToString("X")));