[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit bug, and error handling in 1.2.12



There were few things about SQL-Ledger that were straight forward enough 
for most people, but one that was reasonably so, was descriptions of 
errors.  Here is an example:

In creating a service, I entered a unit of "1time", and then thought "hmm, 
I wonder if this field can take more than 5 characters?" so changed it to 
"1-time", with no objection from the HTML input element's max attribute.  
(The fact that there is not a 5 character max set there is a bug I would 
think--there was one in SL)

I then tried to save the item (it survived an update just fine), and 
promptly got this.  Now, if I didn't know what I did, and was not a 
programmer, this would not have made any sense to me.


DBD::Pg::st execute failed: ERROR: value too long for type character
   varying(5)

Error!

   UPDATE parts
   SET partnumber = ?,
   description = ?,
   makemodel = ?,
   alternate = ?,
   assembly = ?,
   listprice = ?,
   sellprice = ?,
   lastcost = ?,
   weight = ?,
   priceupdate = ?,
   unit = ?,
   notes = ?,
   rop = ?,
   bin =
   inventory_accno_id = (SELECT id FROM chart
   WHERE accno = ?),
   income_accno_id = (SELECT id FROM chart
   WHERE accno = ?),
   expense_accno_id = (SELECT id FROM chart
   WHERE accno = ?),
   obsolete = ?,
   image = ?,
   drawing = ?,
   microfiche = ?,
   partsgroup_id = ?
   WHERE id = ?
   ERROR: value too long for type character varying(5)