/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
practical_exercises/10_day_practice/day9/exception/6.cpp
22 строки
344 B
zhangxing
support bazel complie this project and format code.
30 мар 2024, 17:00
30 мар 2024, 17:00
3c8a3f2
Код
Авторство
О чём код?
// Eg10-6.cpp #include <iostream> using namespace std; void Errhandler(int n) throw() { try { if (n == 1) throw n; if (n == 2) throw "dx"; if (n == 3) throw 1.1; } catch (...) { cout << "catch an exception..." << endl; } } int main() { Errhandler(1); Errhandler(2); Errhandler(3); return 0; }