/usr/share/octave/site/m/vlfeat/toolbox/xtest/vl_assert_exception.m is in octave-vlfeat 0.9.17+dfsg0-6+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | function vl_assert_exception(func, errorId, errorMessage)
% VL_ASSERT_EXCEPTION
try
func() ;
catch
e = lasterror ;
if nargin >= 2
assert(isequal(e.identifier, errorId), ...
'Exception ID ''%s'' is not ''%s''.', ...
e.identifier, errorId) ;
end
if nargin >= 3
assert(isequal(e.message, errorMessage), ...
'Exception message ''%s'' is not ''%s''.', ...
e.message, errorMessage) ;
end
return ;
end
assert(0, 'The function did not generate an exception.') ;
end
|