Index: trunk/ippScripts/scripts/detrend_reject_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 23186)
+++ trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 23295)
@@ -336,4 +336,6 @@
     my $exit_code = shift; # Exit code to add
 
+    $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
+
     carp($msg);
     if (defined $det_id and defined $iter and not $no_update) {
