Throw error on an undefined reference