* \brief Raises an exception if any JWT-CPP error codes are active */
| 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 |
no test coverage detected