Modernes C++ programmieren

Okt 23, 2024

lst-0216-book.cpp

// https://godbolt.org/z/TsP33njar 
#include <iostream>
#include <stdexcept> // exception

int main() {
    try {
        // … Ihr sonstiger Code …
    } catch(std::exception& exc) {
        std::cerr << "main: " << exc.what() << "\n";
    }
}