]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
Se agregan los try en el cliente para que no palme
authorNicolás Dimov <ndimov@gmail.com>
Wed, 3 Dec 2003 02:03:35 +0000 (02:03 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Wed, 3 Dec 2003 02:03:35 +0000 (02:03 +0000)
Client/src/principal.cpp
Constructor/src/constructor.cpp

index 89caf8233ccf2161847e4119c618a0354b10b35d..db0dd1211b66d115ece2f3689c66398a17a8712e 100644 (file)
@@ -53,7 +53,12 @@ Principal::Principal(BaseObjectType *co, const Glib::RefPtr<Gnome::Glade::Xml> &
        rev = rev.substr(6, rev.length() - 8);
        std::string s = "PlaQui Client versión " VERSION " (revisión ";
        s += rev + ")"; 
-       lbl_plaqui_version->set_text(Glib::locale_to_utf8(s));
+       try {
+               lbl_plaqui_version->set_text(Glib::locale_to_utf8(s));
+       }
+       catch (...) {
+               lbl_plaqui_version->set_text("PlaQui Client");
+       }
 
        rg->get_widget("anim_frames", anim);
        anim->set(anim_frames[current_frame]);
@@ -378,7 +383,12 @@ void Principal::on_conexion_ok(const std::string &body)
                load_xml_dispatch();
        } else {
                Glib::ustring s;
-               s = "<IN>\n"+Glib::locale_to_utf8(body)+"\n</IN>\n";
+               try {
+                       s = "<IN>\n"+Glib::locale_to_utf8(body)+"\n</IN>\n";
+               }
+               catch (...) {
+                       s = "NO SE PUDO CONVERTIR MENSAJE A UTF8";
+               }
                txt_view->get_buffer()->insert(txt_view->get_buffer()->begin(),s);
        }
 }
index 32ea18aecfce00f205626c0ac10d5b0daa7a9be7..cefdbddff2bb6e4952fd206f20e51273412fde34 100644 (file)
@@ -27,10 +27,10 @@ Constructor::Constructor(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
                lbl_plaqui_version->set_text(Glib::locale_to_utf8(s));
        }
        catch (Glib::ConvertError e) {
-               std::cout << "ConvertError " << e.code() << std::endl;
+               lbl_plaqui_version->set_text("PlaQui Constructor");
        }
        catch (...) {
-               std::cout << "Error no esperado" << std::endl;
+               lbl_plaqui_version->set_text("PlaQui Constructor");
        }
        
        refGlade->get_widget("dlgAbout", dlg_about);