catch markup exceptions cleanups

2006-08-24 Bart Hakvoort <hakvoort@cvs.gnome.org>

* src/OperationDetail.cc: catch markup exceptions
* src/Utils.cc: cleanups
This commit is contained in:
Bart Hakvoort 2006-08-24 19:29:28 +00:00 committed by Bart Hakvoort
parent e58a5f3cf7
commit 5631232ee1
3 changed files with 25 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2006-08-24 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/OperationDetail.cc: catch markup exceptions
* src/Utils.cc: cleanups
2006-08-21 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Utils.h,

View File

@ -39,6 +39,8 @@ OperationDetail::OperationDetail( const Glib::ustring & description, OperationDe
}
void OperationDetail::set_description( const Glib::ustring & description, Font font )
{
try
{
switch ( font )
{
@ -55,6 +57,11 @@ void OperationDetail::set_description( const Glib::ustring & description, Font f
this ->description = "<b><i>" + Glib::Markup::escape_text( description ) + "</i></b>" ;
break ;
}
}
catch ( Glib::Exception & e )
{
this ->description = e .what() ;
}
on_update( *this ) ;
}

View File

@ -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 ;
}