A Lambda Calculus intepreter in Java
October 29, 2015 • Alex Leighton
I’ve picked up a practice recently: any time I need to provide a message (typically for errors or logging), I make sure the function in question takes varargs and then pass them to String.format. Most of the time I provide a message, I eventually want to use a format-string and it’s just lame to have to call String.format every time.
throw new UnexpectedIssueException(e, "Could not invoke test method \"%s\".", testName);