MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / throw_if_error

Function throw_if_error

include/jwt-cpp/jwt.h:383–392  ·  view source on GitHub ↗

* \brief Raises an exception if any JWT-CPP error codes are active */

Source from the content-addressed store, hash-verified

381 * \brief Raises an exception if any JWT-CPP error codes are active
382 */
383 inline void throw_if_error(std::error_code ec) {
384 if (ec) {
385 if (ec.category() == rsa_error_category()) throw rsa_exception(ec);
386 if (ec.category() == ecdsa_error_category()) throw ecdsa_exception(ec);
387 if (ec.category() == signature_verification_error_category())
388 throw signature_verification_exception(ec);
389 if (ec.category() == signature_generation_error_category()) throw signature_generation_exception(ec);
390 if (ec.category() == token_verification_error_category()) throw token_verification_exception(ec);
391 }
392 }
393 } // namespace error
394} // namespace jwt
395

Callers 12

extract_pubkey_from_certFunction · 0.85
convert_der_to_pemFunction · 0.85
raw2bnFunction · 0.85
signMethod · 0.85
verifyMethod · 0.85

Tested by

no test coverage detected