Add exception on decode function.