public static ErrorDetails GetLastError() { int errorCode = GetErrorCode(); if (KnownErrors.ContainsKey(errorCode)) { return KnownErrors[errorCode]; } string message = Marshal.PtrToStringAnsi(LibXs.xs_strerror(errorCode)); var errorDetails = new ErrorDetails(errorCode, message); KnownErrors[errorCode] = errorDetails; return errorDetails; }
internal XsException(ErrorDetails errorDetails) : this(errorDetails.ErrorCode, errorDetails.Message) { }
internal XsDeviceException(ErrorDetails errorDetails) : base(errorDetails) { }
internal XsSocketException(ErrorDetails errorDetails) : base(errorDetails) { }