dummy-link

ArgCheck

Package for checking function arguments

Readme

ArgCheck

Build Status codecov.io

Installation

Pkg.add("ArgCheck")

Usage

using ArgCheck

function f(x,y)
    @argcheck cos(x) < sin(y)
    # doit
end

f(0,0)
ERROR: ArgumentError: cos(x) < sin(y) must hold. Got
cos(x) => 1.0
sin(y) => 0.0

You can also customize the error:

@argcheck k > n
@argcheck size(A) == size(B) DimensionMismatch
@argcheck det(A) < 0 DomainError()
@argcheck false MyCustomError(my, args...)

First Commit

02/15/2017

Last Touched

6 days ago

Commits

36 commits

Requires: