[gimp-perl] Improve error reporting on Gimp::PixelRgn->new.



commit e636c7f0cd160c16d4d66832bf58ee771b2b6dd9
Author: Ed J <edj src gnome org>
Date:   Thu Jun 19 04:16:43 2014 +0100

    Improve error reporting on Gimp::PixelRgn->new.

 Gimp.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/Gimp.pm b/Gimp.pm
index c25ec73..18164e5 100644
--- a/Gimp.pm
+++ b/Gimp.pm
@@ -373,10 +373,14 @@ _pseudoclass qw(Pattern           gimp_pattern_);
 
 {
 package Gimp::PixelRgn;
+use vars qw(@CARP_NOT); # package scope
+ CARP_NOT = qw(Gimp);
 
 sub new($$$$$$$$) {
    shift;
-   Gimp::PixelRgn->init(@_);
+   my $self = eval { Gimp::PixelRgn->init(@_); };
+   die "Args=(@_): ".$@ if $@;
+   $self;
 }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]