  Quantum measurements are ubiquitous in quantum information processing tasks,
but errors can render their outputs unreliable. Here, we present a scheme that
implements a robust projective measurement through measuring code-inspired
observables. Namely, given a projective POVM, a classical code and a constraint
on the number of measurement outcomes each observable can have, we construct
commuting observables whose measurement is equivalent to the projective
measurement in the noiseless setting. Moreover, we can correct $t$ errors on
the classical outcomes of the observables' measurement if the classical code
corrects $t$ errors. Since our scheme does not require the encoding of quantum
data onto a quantum error correction code, it can help construct robust
measurements for near-term quantum algorithms that do not use quantum error
correction. Moreover, our scheme works for any projective POVM, and hence can
allow robust syndrome extraction procedures in non-stabilizer quantum error
correction codes.
