throw error on non existing pattern