throw an exception when using the process function