diff --git a/src/main.cpp b/src/main.cpp index 8367ec0f1..867eff6da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -57,6 +58,12 @@ int main (int argc, const char** argv) status = -1; } + catch (std::bad_alloc& error) + { + std::cerr << "Error: Memory allocation failed: " << error.what () << "\n"; + status = -3; + } + catch (...) { std::cerr << STRING_UNKNOWN_ERROR << "\n";