I just started with angular. I was being told to handle the above error by using try-catch and display the proper message on HTML. I searched on the internet about error handling but I couldn't find a link about try-catch. if there is any other method please mention it. I am giving the error snap below and also posting the code where the error has occurred. thanks in advance.

[![error image](https://i.stack.imgur.com/M1ouI.png)](https://i.stack.imgur.com/M1ouI.png) 

```
            self.bulkQuestions[quesNo - 1]['category'] = self.items.value[itemIndex].category.split('|')[1];

```