From d08ca3afaba12ded477f93213d3a79bf5c57bc20 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 May 2004 07:23:33 +0000 Subject: better error logging when gtkcreate_img or gtkcreate_pixbuf can't find the image --- perl-install/ugtk2.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 5bed679b1..6d5bb165f 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -600,12 +600,12 @@ sub _find_imgfile { # use it if you want to display an icon/image in your app sub gtkcreate_img { - return Gtk2::Image->new_from_file(_find_imgfile(@_)); + return Gtk2::Image->new_from_file(_find_imgfile(@_) || internal_error("can't find $_[0]")); } # use it if you want to draw an image onto a drawingarea sub gtkcreate_pixbuf { - return Gtk2::Gdk::Pixbuf->new_from_file(_find_imgfile(@_)); + return Gtk2::Gdk::Pixbuf->new_from_file(_find_imgfile(@_) || internal_error("can't find $_[0]")); } sub gtktext_append { gtktext_insert(@_, append => 1) } -- cgit v1.2.1