function error injector - function and type decorators to simulate runtime errors for testing