On 02/29/2012 10:57 AM, Michael Meeks wrote:
Having said all this - I think we can agree that if we are calling this
new 'createFromAscii_WithLength' method - which is (currently) only
called during these magic constructors for compile time constants, that
the chance of having a 4Gb compile-time constant string in the source is
somewhat minimal ;-) and that there is certainly no need to throw an
exception and bloat the call-sites for this case at least.
I don't really think we can agree here. ;) As long as the "bloat" is
only alleged, I see no reason to abandon clean coding practices (i.e.,
checking C function return values for error indicators). If you are
unhappy with "throw std::bad_alloc;", maybe we can settle for
"std::abort();" instead?
Stephan
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice