From 5631232ee1c4d66c708992faa45ecbf093f246df Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Thu, 24 Aug 2006 19:29:28 +0000 Subject: [PATCH] catch markup exceptions cleanups 2006-08-24 Bart Hakvoort * src/OperationDetail.cc: catch markup exceptions * src/Utils.cc: cleanups --- ChangeLog | 5 +++++ src/OperationDetail.cc | 33 ++++++++++++++++++++------------- src/Utils.cc | 3 --- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 257af727..620261c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-24 Bart Hakvoort + + * src/OperationDetail.cc: catch markup exceptions + * src/Utils.cc: cleanups + 2006-08-21 Bart Hakvoort * include/Utils.h, diff --git a/src/OperationDetail.cc b/src/OperationDetail.cc index a0f883dc..8c4372f6 100644 --- a/src/OperationDetail.cc +++ b/src/OperationDetail.cc @@ -40,20 +40,27 @@ OperationDetail::OperationDetail( const Glib::ustring & description, OperationDe void OperationDetail::set_description( const Glib::ustring & description, Font font ) { - switch ( font ) + try { - case FONT_NORMAL: - this ->description = Glib::Markup::escape_text( description ) ; - break ; - case FONT_BOLD: - this ->description = "" + Glib::Markup::escape_text( description ) + "" ; - break ; - case FONT_ITALIC: - this ->description = "" + Glib::Markup::escape_text( description ) + "" ; - break ; - case FONT_BOLD_ITALIC: - this ->description = "" + Glib::Markup::escape_text( description ) + "" ; - break ; + switch ( font ) + { + case FONT_NORMAL: + this ->description = Glib::Markup::escape_text( description ) ; + break ; + case FONT_BOLD: + this ->description = "" + Glib::Markup::escape_text( description ) + "" ; + break ; + case FONT_ITALIC: + this ->description = "" + Glib::Markup::escape_text( description ) + "" ; + break ; + case FONT_BOLD_ITALIC: + this ->description = "" + Glib::Markup::escape_text( description ) + "" ; + break ; + } + } + catch ( Glib::Exception & e ) + { + this ->description = e .what() ; } on_update( *this ) ; diff --git a/src/Utils.cc b/src/Utils.cc index ccbf4909..3d6c185c 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -253,9 +253,6 @@ int Utils::execute_command( const Glib::ustring & command, { error = e .what() ; - //spit exceptions to stdout.. - std::cout << error << std::endl ; - return -1 ; }