Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Exception messages like SL4J logger placeholders

I have to throw an exception with a custom message. I want to do something like in SL4J:

throw new RuntimeException("Error with id {} in file {}", id, file);

Is there any library to do this?

It's very awful to code something like:

throw new RuntimeException("Error with id " + id + " in file " + file);

Thanks!

Comments