Refactor error macro + helper.