add error() implementation to Decoder