[mercury-users] question about error/1
Ralph Becket
rafe at csse.unimelb.edu.au
Thu Jan 24 15:45:08 AEDT 2008
Mark Brown, Thursday, 24 January 2008:
>
> I think we should export code like this from the exception module. Eg:
>
> try_main(MyMain, MsgPred, !IO)
>
> where MyMain has a signature like main/2, and MsgPred accepts a string
> input and an io pair. If MyMain throws an exception of the type generated
> by the "abort with message" predicate, then MsgPred is called with the
> given string.
Why not encapsulate the print pred in the exception itself? That might
make things more flexible.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list