Exception is not really needed here.
(cherry picked from commit 2d0f20a64c1ef059020f3099425856d92151aff1)