API Generator: replace exception to show WARNING