chiark / gitweb /
DECISION: log lines are more parseable and include an explanation of how the decision...
[modbot-mtm.git] / webstump / scripts / gatekeeper.lib
index 3adca4b563b382790b306aa19ca3a8408acbc8e4..b90a2e066c2fa231fb4533d741cc8e2825d39d84 100644 (file)
@@ -67,7 +67,7 @@ sub prepareArticle {
 
   $body .= $_ while( <ARTICLE> );
 
-print "Header:\n\n$header\nBody:\n\n$body\n";
+print "Header:\n\n$header\nBody:\n\n$body\n" or die $!;
 
   return $headers . $body;
 }
@@ -92,8 +92,8 @@ sub processApproved {
     my $spoolfile = "$posting_spool_dir/$$.$time";
     open( SPOOL, ">$posting_spool_dir/$$.$time" ) 
       || &error( "Can't open $spoolfile" );
-    print SPOOL $message;
-    close( SPOOL );
+    print SPOOL $message or die $!;
+    close( SPOOL ) or die $!;
   }
 }