about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-06-14 18:42:50 +0530
committerAndinus <andinus@nand.sh>2020-06-14 18:42:50 +0530
commit7c5d71cce3654d8cb06aec8be0f1753592b538fb (patch)
treed6b78cbfe44ab5432b77027aaeadb2aeab02316c
parentf5d7af46a44872fb9c841e13f1b3e8aac48185aa (diff)
downloadara-7c5d71cce3654d8cb06aec8be0f1753592b538fb.tar.gz
Print error when no rows to print
-rwxr-xr-xara.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/ara.pl b/ara.pl
index 61f066e..4027c49 100755
--- a/ara.pl
+++ b/ara.pl
@@ -324,6 +324,9 @@ foreach my $i ( 0 ... scalar @$statewise - 1 ) {
     $rows_printed++;
 }
 
+die LOCALCOLOR RED "No rows in table"
+    unless $rows_printed;
+
 # Generate tables.
 if ( $state_notes ) {
     print $notes_table;