KAA-280: fix error handling macro; add a couple comments