// file : openssl/types-parsers.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2018 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #include #include // openssl::cli namespace namespace openssl { namespace cli { void parser:: parse (simulate_outcome& x, bool& xs, scanner& s) { xs = true; const char* o (s.next ()); if (!s.more ()) throw missing_value (o); const string v (s.next ()); try { x = to_simulate_outcome (v); } catch (const invalid_argument&) { throw invalid_value (o, v); } } } }