Focus3D / crunchy

Automatically exported from code.google.com/p/crunchy
0 stars 0 forks source link

Colorizer error handling sub-standard #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Crunchy's colorizer currently returns a two-tuple containing either
(styled_code, raw_code) or, if an error is found (some_error_message,
None).   The value "None" is used to identify if an error was found.  

A better approach would be to return a three-tuple, possibly
(styled_code, raw_code, None) if no error is found, or
(something_to_be_determined, raw_code, error_message) if an error is found.

This change in api would break a fair bit of existing code, but would yield
something much more robust in the end, as the raw_code could still be
available, even when styling is not possible.

Original issue reported on code.google.com by andre.ro...@gmail.com on 2 Feb 2008 at 6:05

GoogleCodeExporter commented 8 years ago
Fixed.  revision 577.

Original comment by andre.ro...@gmail.com on 2 Feb 2008 at 7:15