catch errors in _dec2bin