Lines 35-40
my $verbose = 0;
Link Here
|
35 |
my $where; |
35 |
my $where; |
36 |
my @type; |
36 |
my @type; |
37 |
my @letter_code; |
37 |
my @letter_code; |
|
|
38 |
my $exit_on_plugin_failure = 0; |
38 |
|
39 |
|
39 |
my $command_line_options = join(" ",@ARGV); |
40 |
my $command_line_options = join(" ",@ARGV); |
40 |
|
41 |
|
Lines 48-53
GetOptions(
Link Here
|
48 |
't|type:s' => \@type, |
49 |
't|type:s' => \@type, |
49 |
'c|code:s' => \@letter_code, |
50 |
'c|code:s' => \@letter_code, |
50 |
'w|where:s' => \$where, |
51 |
'w|where:s' => \$where, |
|
|
52 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
51 |
); |
53 |
); |
52 |
my $usage = << 'ENDUSAGE'; |
54 |
my $usage = << 'ENDUSAGE'; |
53 |
|
55 |
|
Lines 67-72
This script has the following parameters :
Link Here
|
67 |
-h --help: this message |
69 |
-h --help: this message |
68 |
-v --verbose: provides verbose output to STDOUT |
70 |
-v --verbose: provides verbose output to STDOUT |
69 |
-w --where: filter messages to send with additional conditions in the where clause |
71 |
-w --where: filter messages to send with additional conditions in the where clause |
|
|
72 |
-e --exit-on-plugin-failure: if enabled, script will exit prematurely if any plugin before_send_messages hook fails |
70 |
ENDUSAGE |
73 |
ENDUSAGE |
71 |
|
74 |
|
72 |
die $usage if $help; |
75 |
die $usage if $help; |
Lines 106-111
if ( C4::Context->config("enable_plugins") ) {
Link Here
|
106 |
} |
109 |
} |
107 |
catch { |
110 |
catch { |
108 |
warn "$_"; |
111 |
warn "$_"; |
|
|
112 |
exit 1 if $exit_on_plugin_failure; |
109 |
}; |
113 |
}; |
110 |
} |
114 |
} |
111 |
} |
115 |
} |
112 |
- |
|
|