Storage::DBI throws intelligent exception if no @connect_info
Brandon L. Black [Wed, 15 Mar 2006 13:17:24 +0000 (13:17 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index ac29900..0da5731 100644 (file)
@@ -350,6 +350,9 @@ sub _populate_dbh {
 sub _connect {
   my ($self, @info) = @_;
 
+  $self->throw_exception("You failed to provide any connection info")
+      if !@info;
+
   my ($old_connect_via, $dbh);
 
   if ($INC{'Apache/DBI.pm'} && $ENV{MOD_PERL}) {