From f5e511f294ffad2d943c20da167e6bf51026dda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 19 Jul 2022 10:15:04 +0200 Subject: [PATCH] Show more details in error message --- include/openPMD/IO/AbstractIOHandlerImpl.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/openPMD/IO/AbstractIOHandlerImpl.hpp b/include/openPMD/IO/AbstractIOHandlerImpl.hpp index 55ff021d06..78da979614 100644 --- a/include/openPMD/IO/AbstractIOHandlerImpl.hpp +++ b/include/openPMD/IO/AbstractIOHandlerImpl.hpp @@ -204,6 +204,17 @@ class AbstractIOHandlerImpl break; } } + catch (std::exception const &e) + { + std::cerr << "[AbstractIOHandlerImpl] IO Task " + << internal::operationAsString(i.operation) + << " failed with exception. Removing task" + << " from IO queue and passing on the exception. " + << "Original exception was: \n" + << e.what() << std::endl; + (*m_handler).m_work.pop(); + throw; + } catch (...) { std::cerr << "[AbstractIOHandlerImpl] IO Task "