Added error when not all function or module code paths return a value