private void OnOperationError(UIError error) { onOperationError?.Invoke(this, error); FinalizedOperation(); PackageManagerOperationErrorAnalytics.SendEvent(GetType().Name, error); }
private void OnErrorMessage(string errorMessage, int operationErrorCode = -1, UIError.Attribute attr = UIError.Attribute.None) { m_State = DownloadState.Error; if ((attr & UIError.Attribute.IsWarning) != 0) { Debug.LogWarning($"{k_ConsoleLogPrefix} {errorMessage}"); } else { Debug.LogError($"{k_ConsoleLogPrefix} {errorMessage}"); } attr |= UIError.Attribute.IsDetailInConsole; if (operationErrorCode == 403) { m_ErrorMessage = k_ForbiddenErrorMessage; } else { attr |= UIError.Attribute.IsClearable; m_ErrorMessage = k_DownloadErrorMessage; } var error = new UIError(UIErrorCode.AssetStoreOperationError, m_ErrorMessage, attr, operationErrorCode); onOperationError?.Invoke(this, error); onOperationFinalized?.Invoke(this); PackageManagerOperationErrorAnalytics.SendEvent(GetType().Name, error); }