should really be throwUnexpectedX(msg) I think.