Skip to content

Commit 7ccbfa0

Browse files
committed
[Matlab] Add NamedEntity.compare error identifier
1 parent a84b286 commit 7ccbfa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

+nix/NamedEntity.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
% Compares first name and second id, return > 0 if the entity
2626
% is larger than the other, 0 if both are equal, and < 0 otherwise.
2727
if (~isa(obj, class(entity)))
28-
error('Only entities of the same class can be compared.');
28+
err.identifier = 'NIXMX:InvalidArgument';
29+
err.message = 'Only entities of the same class can be compared.';
30+
error(err);
2931
end
3032
fname = strcat(obj.alias, '::compare');
3133
r = nix_mx(fname, obj.nix_handle, entity.nix_handle);

0 commit comments

Comments
 (0)