Skip to content

Commit 3f43d34

Browse files
committed
Add error IDs and update help text about deployable archives
1 parent 4ccf8ce commit 3f43d34

File tree

1 file changed

+7
-2
lines changed
  • auto-instrumentation/+opentelemetry/+autoinstrument

1 file changed

+7
-2
lines changed

auto-instrumentation/+opentelemetry/+autoinstrument/AutoTrace.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
% instrumentation will stop and the functions will no longer
2525
% be instrumented.
2626
%
27+
% If called in a deployable archive (CTF file), all M-files
28+
% included in the CTF will be instrumented.
29+
%
2730
% AT = OPENTELEMETRY.AUTOINSTRUMENT.AUTOTRACE(FUN, NAME1, VALUE1,
2831
% NAME2, VALUE2, ...) specifies optional name-value pairs.
2932
% Supported options are:
@@ -155,9 +158,11 @@ function handleError(obj, ME)
155158
function processFileInput(f)
156159
f = string(f); % force into a string
157160
if startsWith(f, '@') % check for anonymous function
158-
error(f + " is an anonymous function and is not supported.");
161+
error("opentelemetry:autoinstrument:AutoTrace:AnonymousFunction", ...
162+
f + " is an anonymous function and is not supported.");
159163
end
160164
if exist(f, "file") ~= 2
161-
error(f + " is not a valid MATLAB file with a .m extension and is not supported.")
165+
error("opentelemetry:autoinstrument:AutoTrace:InvalidMFile", ...
166+
f + " is not found or is not a valid MATLAB file with a .m extension.")
162167
end
163168
end

0 commit comments

Comments
 (0)