*catching exception when illegal data encoding is received