* Bug 14435 fixed: better error reporting in extract overloads
http://bugzilla.scilab.org/show_bug.cgi?id=14435
When you overload extraction on a MList or a TList, error reporting
should be handled by the overload, this is not the case:
t=tlist(["user","x"],0);
function varargout = %user_e(i,x)
if or(i==["a" "b"])
mprintf("Extract field %s\n",i);
else
error(msprintf("Error: field %s is undefined !\n\n",i));
end
end
--> t.a
Extract field a
--> t.z
at line 5 of function %user_e
Undefined operation for the given operands.
check or define function %l_e for overloading.
I don't see the error message of the overload, it has been
superseeded. Moreover, it is incorrect (we are not overloading an
operator).
With the proposed patch we have:
--> t.z
at line 5 of function %user_e
Error: field z is undefined !
--> t("z")
at line 5 of function %user_e
Error: field z is undefined !
Change-Id: Idc8fa19579c38093019a97e8542f10ed4782ed8f