I think mostly we need a style guide on how to write nice error messages. ERROR: wrong value 27 ERROR: wrong value for `answer` (27) ERROR: wrong value for `answer` (27) must be 42 ERROR: /canvas/question[0]: wrong value for `answer` (27) must be 42
etc. On 2010-05-21, at 14:42, Lou Iorio wrote: > Chapter 51. Debugging, in the Developers Guide, hints at this, but perhaps > it doesn't put it strongly enough? > > "Debug.write() is the simplest way to log to the debugger, but it's often a > better strategy to use Debug.format() or one of its variants..." > > The documentation could certainly be more clear. > > On Fri, May 21, 2010 at 2:10 PM, P T Withington <[email protected]> wrote: > >> In your travels around OpenLaszlo, either writing new code or improving old >> code, if you stumble upon a Debug.write, take a minute to consider if it >> would be better implemented as one of Debug.debug, Debug.info, Debug.warn, >> or Debug.error (or possibly Debug.format, if it really does not fall into >> one of those categories). Debug.write lives on for compatibility, but it is >> almost never the right choice. debug/info/warn/error will be output in >> 'conventional' colors, and can be filtered by the setting of >> Debug.messageLevel. They also support the full suite of formatted output, >> which can make your messages more concise and informative. >> >> >> >> >>
