[TASK] Add try catch for error handling

The viewhelper should not throw exceptions