< Summary

Class:Azure.AI.TextAnalytics.TextAnalyticsError
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextAnalyticsError.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:34
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_ErrorCode()-100%100%
get_Message()-100%100%
get_Target()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextAnalyticsError.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace Azure.AI.TextAnalytics
 5{
 6    /// <summary>
 7    /// Text Analytics Error.
 8    /// </summary>
 9    public struct TextAnalyticsError
 10    {
 11        internal TextAnalyticsError(string code, string message, string target = null)
 12        {
 5213            ErrorCode = code;
 5214            Message = message;
 5215            Target = target;
 5216        }
 17
 18        /// <summary>
 19        /// Error code that serves as an indicator of the HTTP error code.
 20        /// </summary>
 58821        public TextAnalyticsErrorCode ErrorCode { get; }
 22
 23        /// <summary>
 24        /// Message that contains more information about the reason of the error.
 25        /// </summary>
 4426        public string Message { get; }
 27
 28        /// <summary>
 29        /// Target of the particular error (e.g. the name of
 30        /// the property in error).
 31        /// </summary>
 432        public string Target { get; }
 33    }
 34}