instead of retuning a string as an error, try this: 

```
raise Exception(" Function not recognized ")
```