|
58 | 58 | valuei = optionvalues{i}; |
59 | 59 | if strcmp(namei, "Endpoint") |
60 | 60 | if ~(isStringScalar(valuei) || (ischar(valuei) && isrow(valuei))) |
61 | | - error("Endpoint must be a scalar string."); |
| 61 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:EndpointNotScalarText", "Endpoint must be a scalar string."); |
62 | 62 | end |
63 | 63 | endpoint = string(valuei); |
64 | 64 | elseif strcmp(namei, "UseCredentials ") |
65 | 65 | if ~((islogical(valuei) || isnumeric(valuei)) && isscalar(valuei)) |
66 | | - error("UseCredentials must be a scalar logical.") |
| 66 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:UseCredentialsNotScalarLogical", "UseCredentials must be a scalar logical.") |
67 | 67 | end |
68 | 68 | usessl = logical(valuei); |
69 | 69 | elseif strcmp(namei, "CertificatePath") |
70 | 70 | if ~(isStringScalar(valuei) || (ischar(valuei) && isrow(valuei))) |
71 | | - error("CertificatePath must be a scalar string."); |
| 71 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:CertificatePathNotScalarText", "CertificatePath must be a scalar string."); |
72 | 72 | end |
73 | 73 | certificatepath = string(valuei); |
74 | 74 | elseif strcmp(namei, "CertificateString") |
75 | 75 | if ~(isStringScalar(valuei) || (ischar(valuei) && isrow(valuei))) |
76 | | - error("CertificateString must be a scalar string."); |
| 76 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:CertificateStringNotScalarText", "CertificateString must be a scalar string."); |
77 | 77 | end |
78 | 78 | certificatestring = string(valuei); |
79 | 79 | elseif strcmp(namei, "Timeout") |
80 | 80 | if ~(isduration(valuei) && isscalar(valuei)) |
81 | | - error("Timeout must be a scalar duration."); |
| 81 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:TimeoutNotScalarDuration", "Timeout must be a scalar duration."); |
82 | 82 | end |
83 | 83 | timeout = valuei; |
84 | 84 | timeout_millis = milliseconds(timeout); |
85 | 85 | else % HttpHeaders |
86 | 86 | if ~isa(valuei, "dictionary") |
87 | | - error("HttpHeaders input must be a dictionary."); |
| 87 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:HttpHeadersNotDictionary", "HttpHeaders input must be a dictionary."); |
88 | 88 | end |
89 | 89 | httpheaders = valuei; |
90 | 90 | headerkeys = keys(valuei); |
91 | 91 | headervalues = values(valuei); |
92 | 92 | if ~isstring(headervalues) |
93 | | - error("HttpHeaders dictionary values must be strings.") |
| 93 | + error("opentelemetry:exporters:otlp:OtlpGrpcSpanExporter:HttpHeadersNonStringValues", "HttpHeaders dictionary values must be strings.") |
94 | 94 | end |
95 | 95 | end |
96 | 96 | end |
|
0 commit comments