Test error reporting with decorated functions