add test of generic error handling
add test of type-specific error handling
clean up decorator