[Jifty-commit] r3163 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Apr 20 16:43:03 EDT 2007
Author: sterling
Date: Fri Apr 20 16:43:02 2007
New Revision: 3163
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Handle.pm
Log:
r4564 at riddle: andrew | 2007-04-20 15:42:21 -0500
Added duck typing to the Jifty::Handle constructor to prevent difficult to trace error messages when the driver name is mispelt or fails to load.
Modified: jifty/trunk/lib/Jifty/Handle.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handle.pm (original)
+++ jifty/trunk/lib/Jifty/Handle.pm Fri Apr 20 16:43:02 2007
@@ -42,6 +42,11 @@
my $driver_class = "Jifty::DBI::Handle::". $driver;
Jifty::Util->require($driver_class);
+ die "No such handle class as $driver_class. ",
+ "Check your spelling and check that your Jifty installation and ",
+ "related modules (especially Jifty::DBI) are up to date."
+ unless $driver_class->can('isa');
+
unshift @ISA, $driver_class;
return $class->SUPER::new();
}
More information about the Jifty-commit
mailing list