From 3e6134cf2cdf211443c23df28b4e310202875875 Mon Sep 17 00:00:00 2001 From: Shiar Date: Mon, 31 Dec 2007 16:19:26 +0000 Subject: [PATCH] give an error if pvpgn report insertion fails --- pvpgnreport | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pvpgnreport b/pvpgnreport index b98fce6..049ffb2 100755 --- a/pvpgnreport +++ b/pvpgnreport @@ -106,7 +106,9 @@ $Db->insert("game", { start => time2str('%Y-%m-%d %X', $start), duration => sprintf('%d seconds', $end - $start), })->rows or die "Game insert failed: ".$Db->error."\n"; -my $gameid = $Db->last_insert_id((undef) x 4, {sequence => "game_id_seq"}); +my $gameid = $Db->last_insert_id((undef) x 4, {sequence => "game_id_seq"}) + or die "Couldn't find our game insertion: ".$Db->error."\n"; +print "Game inserted as # $gameid\n"; $Db->insert("play", { game => $gameid, -- 2.30.0