Allow out-of-scope error message to be customized.