{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method LogException | Addressables | 1.21.17
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    Method LogException

    LogException(AsyncOperationHandle, Exception)

    Write an exception as a log message.

    선언
    public static void LogException(AsyncOperationHandle op, Exception ex)
    파라미터
    타입 이름 설명
    AsyncOperationHandle op

    The operation handle.

    Exception ex

    The exception.

    참고

    LogException can be used to convert an exception to a log message. The exception is stringified. If the operation is in a failed state, the exception is logged at an Error logging level. If not the exception is logged at a Debug logging level. Addressables logs warnings and errors so if the operation is not in a failed state by default this function will not log.

    예
    public async Task<Material> LogExceptionSuccessfulTask(bool isErrored)
    {
        var loadHandle = Addressables.LoadAssetAsync<Material>("green.material");
        var material = await loadHandle.Task;
        if (loadHandle.Status == AsyncOperationStatus.Failed)
        {
            // something went wrong, log it and return the placeholder material
            Addressables.LogException(loadHandle, loadHandle.OperationException);
            return k_PlaceholderMaterial;
        }
        return material;
    }
    참고
    Enable all logging

    LogException(Exception)

    Write an exception as a debug log message.

    선언
    public static void LogException(Exception ex)
    파라미터
    타입 이름 설명
    Exception ex

    The exception.

    참고

    LogException can be used to convert an exception to a log message. The exception is stringified and logged at a Debug logging level. Addressables logs warnings and errors so by default this function will not log.

    예
          public void LogExceptionDebugLogging(bool isErrored)
    {            
              try
              {
                  if (isErrored)
                  {
                      throw new Exception("Unable to complete task");
                  }
    
              } catch(Exception e)
              {
                  Addressables.LogException(e);
              }            
          }
    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)