ArgCheck.@argcheckMacro
@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.@checkMacro
@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.