Char2Hex conversion looks unnecessary in case of error:

break; here?