ArgCheck.@argcheck
— Macro@argcheck
Check invariants on function arguments and produce a nice exception message if they are violated. Usage is as follows:
function myfunction(k,n,A,B)
@argcheck k > n
@argcheck size(A) == size(B) DimensionMismatch
@argcheck det(A) < 0 DomainError()
# doit
end
See also @check
.
ArgCheck.@check
— Macro@check
Check that a condition holds and produce a nice exception message, if it does not. Usage is as follows:
@check k > n
@check size(A) == size(B) DimensionMismatch
@check det(A) < 0 DomainError()
See also @argcheck
.