move the xerror handling into the libobt