douglasg14b / BetterConsoleTables

Faster, colorable, more configurable, and more robust console colors & tables for C# console applications
GNU Lesser General Public License v3.0
92 stars 16 forks source link

IndexOutOfRangeException when no rows were given #15

Closed fubar-coder closed 3 years ago

fubar-coder commented 4 years ago

This is the stack trace:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at BetterConsoleTables.Table.ToString(Int32[] columnLengths)
   at BetterConsoleTables.Table.ToString()
douglasg14b commented 4 years ago

Thanks for the report, I'll look into this at my next availability.

douglasg14b commented 4 years ago

This will be fixed in v2

For now make sure to add even a blank row, if that is too much of a bother I can make a change on this branch.

fubar-coder commented 4 years ago

I worked around this problem by writing a message that there's no data available (and thus doesn't write a table).

douglasg14b commented 3 years ago

closing as resolved