summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-eftca-download
diff options
context:
space:
mode:
Diffstat (limited to 'FS/bin/freeside-eftca-download')
-rwxr-xr-xFS/bin/freeside-eftca-download5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/bin/freeside-eftca-download b/FS/bin/freeside-eftca-download
index caf9e0e70..56d82c7f5 100755
--- a/FS/bin/freeside-eftca-download
+++ b/FS/bin/freeside-eftca-download
@@ -57,7 +57,10 @@ my $conf = new FS::Conf;
my @agents;
if ( $conf->exists('batch-spoolagent') ) {
- @agents = qsearch('agent', { 'disabled' => '' });
+ local $@;
+ eval { @agents = qsearch('agent', { 'disabled' => '' }); };
+ log_error_and_die("Fatal database error: $@")
+ if $@;
} else {
@agents = (1);
}