[Issue 10828] datetime toString functions should accept sink

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 8 09:21:15 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=10828


Marco Leise <Marco.Leise at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Marco.Leise at gmx.de


--- Comment #1 from Marco Leise <Marco.Leise at gmx.de> 2014-04-08 09:21:09 PDT ---
The problem will move on to the checks of the format specifiers, which want to
throw exceptions, which means the GC could in turn throw
InvalidMemoryOperationError.

Now one could fix the GC to allow exceptions to be thrown from ~this(), but
basically if the dtor really fails, your program is possibly in an invalid
state.
Maybe my thinking is wrong, but I'd say it should either complete or terminate
the application like AssertError, InvalidMemoryOperationError or
OutOfMemoryError do.

That said, the logging should be wrapped in a try-catch here: It is more
important that the rest of the dtor succeeds. About the GC, I don't know what
to do. It would be best if the implementation could allow further allocations
while the collection is running. Like when you create a new pool for the
allocations and join it with the old one after collection.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list