--- Comment #11 from Jonathan M Davis <> 2010-08-17 
12:08:49 PDT ---
I'm not sure that I understand your question about the msg parameter. If you
put it in with the function arguments, then you _have_ to give a message every
time because you can't use default parameters for the first argument. And since
it would likely be the rare case to add an additional message, that would be
annoying. With it as an additional template argument, you can have two
templates - the normal one which omits the message and the more rarely used one
which includes it.

I'd argue that for simplicity's sake, your lineFile struct really shouldn't
need to be declared. You should just be able to make a function call (be it a
standalone function or a static one on the struct itself) and have it return
the struct. I think that the struct should get in the way as little as possible
(since ideally, it wouldn't even be there at all). You could probably just use
opCall() and do this:

assertExceptionThrown!(AssertError, myfunc)(LineInfo(), 5);

Also, we might want to rename the template functions to assertExcThrown() and
assertExcNotThrown() just because the names are painfully long, albeit nicely

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to