From eda65b755c131dc9e33ba8e68af829a59f32d419 Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Thu, 3 Nov 2011 12:10:33 +0100 Subject: [PATCH] ENH: more informative log messages --- Code/ApplicationEngine/otbWrapperApplication.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Code/ApplicationEngine/otbWrapperApplication.cxx b/Code/ApplicationEngine/otbWrapperApplication.cxx index 55f7832067..1afcc21c18 100644 --- a/Code/ApplicationEngine/otbWrapperApplication.cxx +++ b/Code/ApplicationEngine/otbWrapperApplication.cxx @@ -116,12 +116,12 @@ bool Application::Execute() catch(std::exception& err) { ret = false; - otbAppLogFATAL(<<err.what()); + otbAppLogFATAL(<<"The following error occurred during application execution : " << err.what()); } catch(...) { ret = false; - otbAppLogFATAL(<<"Unknown exception thrown."); + otbAppLogFATAL(<<"An unknown exception has been raised during application execution"); } return ret; @@ -196,7 +196,9 @@ bool Application::ExecuteAndWriteOutput() { outputParam->SetRAMValue(ram); } - AddProcess(outputParam->GetWriter(),"Complex Writer"); + std::ostringstream progressId; + progressId << "Writing " << outputParam->GetFileName() << "..."; + AddProcess(outputParam->GetWriter(), progressId.str()); outputParam->Write(); } } @@ -204,12 +206,12 @@ bool Application::ExecuteAndWriteOutput() catch(std::exception& err) { status = false; - otbAppLogFATAL(<<err.what()); + otbAppLogFATAL(<<"The following error occurred when writing outputs : " << err.what()); } catch(...) { status = false; - otbAppLogFATAL(<<"Unknown exception thrown."); + otbAppLogFATAL(<<"Unknown exception raised when writing outputs"); } } -- GitLab