"Jonathan M Davis" <[email protected]> wrote in message news:[email protected]... > On Saturday 06 November 2010 12:28:02 Masahiro Nakagawa wrote: >> I don't know this module's usability, but is getExcMsg useful? >> I can't imagine useful situation. >> In addition, I grepped your datetime.d and getExcMsg not found :( >> >> If possible, I want the mock, stub and related features. > > It's used to test unittests.d itself, but I don't think that I'm using it > in > datetime.d at the moment. The idea is to use it if you want to verify that > an > exception says exactly what you want it to say (especially if you could > get > multiple exceptions of the same type but with different messages from a > function). I will grant you, however, that it's one of the less useful > functions. >
I'm not suggesting getExcMsg be removed, but if you ever need to verify an exception's message is exactly matches a specific string, then you're almost certainly using exceptions the wrong way to begin with.
