Clarify is_exception(undef) behavior missed in 841efcb3
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index 60e0409..3e3b68f 100644 (file)
@@ -83,6 +83,12 @@ sub refcount ($) {
 sub is_exception ($) {
   my $e = $_[0];
 
+  # this is not strictly correct - an eval setting $@ to undef
+  # is *not* the same as an eval setting $@ to ''
+  # but for the sake of simplicity assume the following for
+  # the time being
+  return 0 unless defined $e;
+
   my ($not_blank, $suberror);
   {
     local $@;