-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
TP3-9508/client_src/client_main.cpp
Lines 15 to 23 in cad058c
| try { | |
| worker.start(); | |
| } catch (std::invalid_argument& e) { | |
| std::cerr << e.what() << std::endl; | |
| } catch (...) { | |
| std::cerr << GENERIC_ERROR << std::endl; | |
| } | |
| return 0; | |
| } |
Si se lanzara una execepción de la STL como por ejemplo std::runtime_error
en vez de printear el mensaje correspondiente, imprimirías un GENERIC_ERROR.
como si estuvieras haciendo un throw "error". El primer catch debe ser mas
genérico, capturando todo lo que herede de std::exception
Metadata
Metadata
Assignees
Labels
No labels