pass exception, not the value on failure

Fixes #374.