Handle exceptions in node binding