convert non-unit-tested module to use newer raise Exception(msg) syntax