git.shiar.nl
/
perl
/
schtarr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0435965
)
give an error if pvpgn report insertion fails
author
Shiar
<shiar@shiar.org>
Mon, 31 Dec 2007 16:19:26 +0000
(16:19 +0000)
committer
Shiar
<shiar@shiar.org>
Mon, 31 Dec 2007 16:19:26 +0000
(16:19 +0000)
pvpgnreport
patch
|
blob
|
history
diff --git
a/pvpgnreport
b/pvpgnreport
index b98fce6019fa93a13412eb98ce8dd267626bba34..049ffb2c800d14b3f23a6e272b2ef9daa0ca808f 100755
(executable)
--- 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";
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,
$Db->insert("play", {
game => $gameid,