fixy icon indicating copy to clipboard operation
fixy copied to clipboard

Improve field length enforcement

Open chrisb opened this issue 9 years ago • 0 comments

Thanks for building Fixy!

This PR attempts to improve some issues we encountered with formatters.

Specifically:

  • Due to our inheritance pattern and formatter re-use, it was difficult to track down the specific fields that caused exceptions to arise from formatters, so we now salt the raised exception with some added context.
  • We then discovered a formatter that was returning a string longer than a given field's size constraint; when encountering this during record generation, raise an exception.
  • One of the tools we used to identify the issue was the debug HTML decorator. Changing the generated page's background-color CSS property to something other than the fields' background color allowed us to easily spot records that exceeded the record length.

Cheers! :beers:

chrisb avatar Aug 11 '15 20:08 chrisb