| 2765 | } |
| 2766 | |
| 2767 | Errata |
| 2768 | Do_proxy_reply::load_status() |
| 2769 | { |
| 2770 | _status_idx = _fg.index_of(STATUS_KEY); |
| 2771 | |
| 2772 | FeatureGroup::ExprInfo &info = _fg[_status_idx]; |
| 2773 | |
| 2774 | if (info._expr.is_literal()) { |
| 2775 | auto &&[status, errata]{std::get<Feature>(info._expr._raw).as_integer(-1)}; |
| 2776 | if (!errata.is_ok()) { |
| 2777 | errata.note("While load key '{}' for directive '{}'", STATUS_KEY, KEY); |
| 2778 | return std::move(errata); |
| 2779 | } |
| 2780 | if (!(100 <= status && status <= 599)) { |
| 2781 | return Errata(S_ERROR, R"(Value for '{}' key in {} directive is not a positive integer 100..599 as required.)", STATUS_KEY, |
| 2782 | KEY); |
| 2783 | } |
| 2784 | _status = status; |
| 2785 | } else if (!info._expr.result_type().can_satisfy(MaskFor(STRING, INTEGER))) { |
| 2786 | return Errata(S_ERROR, R"({} is not an integer nor string as required.)", STATUS_KEY); |
| 2787 | } |
| 2788 | return {}; |
| 2789 | } |
| 2790 | |
| 2791 | Rv<Directive::Handle> |
| 2792 | Do_proxy_reply::load(Config &cfg, CfgStaticData const *, YAML::Node drtv_node, swoc::TextView const &, swoc::TextView const &, |
no test coverage detected