Function to pass a exception and error message.
void errorWithException(String message, Exception exception);