#include <iostream>
#include <vector>

auto main() -> int
{
    auto items = std::vector<int> {};
    try {
        items.resize(items.max_size() + 1);
    } catch (std::bad_alloc& e) {
        std::cout << "Out of bounds.\n";
    } catch (std::exception&) {
        std::cout << "General exception.\n";
    }
}