Пример #1
0
PPPoE::vendor_spec_type PPPoE::vendor_specific() const {
    const tag* t = search_tag(VENDOR_SPECIFIC);
    if (!t) {
        throw option_not_found();
    }
    return t->to<vendor_spec_type>();
}
Пример #2
0
const Option& Options::getOption(const std::string& name) const
{
    map_t::const_iterator iter = m_options.find(name);
    if (iter == m_options.end())
    {
        std::ostringstream oss;
        oss << "Required option '" << name << "' was not found on this stage";
        throw option_not_found(oss.str());
    }
    const Option& option = iter->second;
    return option;
}