这段程序会输出什么?

来自 异常处理
C++23 (GCC 13.3.0) 进阶 2分钟

这段程序会输出什么?

C++
#include <iostream>
#include <stdexcept>

int main() {
    try {
        throw std::out_of_range("index");
    } catch (const std::invalid_argument& error) {
        std::cout << "invalid: " << error.what() << '\n';
    } catch (const std::logic_error& error) {
        std::cout << "logic: " << error.what() << '\n';
    } catch (const std::exception& error) {
        std::cout << "standard: " << error.what() << '\n';
    }
}
在试验场中打开
报告错误