Allow for optionally specifying arguments

Makes it easier to test argument-dependent exceptions. Related to issue #121.