[mercury-users] design of stream library

Michael Day mcda at students.cs.mu.oz.au
Mon Sep 4 21:35:26 AEDT 2000


> However this doesn't interact well with exceptions.  Say you have a bit
> of code which outputs to a stream but might throw an exception, you wrap
> it in an exception handler and you then want to clean up the stream, but
> you no longer have a handle with which to refer to the stream.

What is the situation, exactly? The streams at present have no real error
handling capability, but perhaps the exception could be caught within
write_char rather than propagated out, and some error state toggled in the
stream?

What guarantees should code provide regarding exceptions? Are there any
issues to keep in mind when designing interfaces to be exception friendly?

Michael

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list