File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 77
77
78
78
function [] = add_entity_array(obj , mxMethodName , add_cell_array , nixEntity )
79
79
if (~iscell(add_cell_array ))
80
- error(' Expected cell array' );
80
+ err.identifier = ' NIXMX:InvalidArgument' ;
81
+ err.message = ' Expected cell array' ;
82
+ error(err );
81
83
end
84
+
82
85
handle_array = cell(1 , length(add_cell_array ));
83
86
for i = 1 : length(add_cell_array )
84
87
if (~strcmpi(class(add_cell_array{i }), nixEntity ))
85
- error(sprintf(' Element #%s is not a %s .' , num2str(i ), nixEntity ));
88
+ err.identifier = ' NIXMX:InvalidArgument' ;
89
+ err.message = sprintf(' Element #%s is not a %s .' , num2str(i ), nixEntity );
90
+ error(err );
86
91
end
87
92
handle_array{i } = add_cell_array{i }.nix_handle;
88
93
end
94
+
89
95
mxMethod = strcat(obj .alias , ' ::' , mxMethodName );
90
96
nix_mx(mxMethod , obj .nix_handle , handle_array );
91
97
end
You can’t perform that action at this time.
0 commit comments