- // Check against maximum number of menus. It appears that no more
- // than 128 menus are reachable through LinkPGCN instructions, and
- // dvdauthor uses some menu numbers for special purposes, resulting
- // in a practical limit of 119 per domain. We can work around this
- // later by spreading some menus across titlesets.
- if (next_menu.index == 119)
- throw std::runtime_error("No more than 119 menus can be used");
+ if (next_menu.index == dvd::domain_pgcs_max)
+ throw_length_error("number of menus", dvd::domain_pgcs_max);