The assertion function to wrap. It should throw an error if the assertion fails.
The custom error class to throw instead of the original error. Defaults to Error.
Text to prepend to the error message. Defaults to an empty string.
A wrapped version of the assertFunc that throws the customError with the prepended message.
Wrap error-generating functions to change the type of error that it throws and optionally prepend its message