});
my $sqlt_schema = $sqlt->translate( data => $schema )
- or $self->throw_exception($sqlt->error);
+ or croak($sqlt->error);
foreach my $db (@$databases) {
$sqlt->reset;
carp("Failed to translate to $db, skipping. (" . $sqlt->error . ")");
next;
}
- my $file;
- unless( open $file, q(>), $filename ) {
- $self->throw_exception("Can't open $filename for writing ($!)");
- next;
- }
+ open my $file, q(>), $filename;
print {$file} $output;
close $file;
}
$sqlt->parser('SQL::Translator::Parser::DBIx::Class');
my $sqlt_schema = $sqlt->translate( data => $schema )
- or $self->throw_exception ($sqlt->error);
+ or croak($sqlt->error);
foreach my $db (@$databases) {
$sqlt->reset;
});
$t->parser( $db ) # could this really throw an exception?
- or $self->throw_exception ($t->error);
+ or croak($t->error);
my $out = $t->translate( $prefilename )
- or $self->throw_exception ($t->error);
+ or croak($t->error);
$source_schema = $t->schema;
});
$t->parser( $db ) # could this really throw an exception?
- or $self->throw_exception ($t->error);
+ or croak($t->error);
my $filename = $self->_ddl_schema_produce_filename($db, $to_version, $dir);
my $out = $t->translate( $filename )
- or $self->throw_exception ($t->error);
+ or croak($t->error);
$dest_schema = $t->schema;
$dest_schema, $db,
$sqltargs
);
- my $file;
- unless(open $file, q(>), $diff_file) {
- $self->throw_exception("Can't write to $diff_file ($!)");
- next;
- }
+ open my $file, q(>), $diff_file;
print {$file} $diff;
close $file;
}