make thrown exceptions have configurable messages