public function decode($data)
    {
        list($data, $consumed, $error) = $this->decodeTransform()
            ->transform($data, $context, true);

        if (null !== $error) {
            throw $error;
        }

        return $data;
    }