error handling

- proper error handling in cases when NDN-CPP library throws an
exception