[m-rev.] for review: better error messages for string.format
    Zoltan Somogyi 
    zoltan.somogyi at runbox.com
       
    Sat Nov 15 18:10:23 AEDT 2014
    
    
  
On Sat, 15 Nov 2014 16:19:32 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> What is of concern here is just how incomplete the documentation for
> string.format is (I looked it up to see what we currently said about the
> %c specifier).  The possiblity of it throwing an exception when an
> invalid format string is passed to it isn't even mentioned!
We should indeed document throwing exceptions for
invalid format strings. And we may want to consider adding
a new version of string.format that, instead of returning
either a formatted string or an exception, returns either
an ok() wrapper around a formatted string, or an error()
wrapper around a problem description.
However, writing detailed descriptions of exactly what each format
specifier does is hard as long as we don't control what they do,
because we just call external code to implement them.
> The diff appears fine.
Thank you.
Zoltan.
    
    
More information about the reviews
mailing list