change API, exceptions are not declared at import time anymore
added test
Changes
documentation