[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Imperfect error message from string.gsub
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 6 Dec 2018 07:51:44 +0200
One sonetimes gets:
bad argument #2 to 'gsub' (string/function/table expected)
By analogy with other messages, the message might have said
bad argument #2 to 'gsub' (string/function/table expected, got nil)
bad argument #2 to 'gsub' (string/function/table expected, got number)
etc. which would immediately give a lead to what the coding mistake was.