/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
AsyncJob::AsyncJob(const char *aTypeName) :
- stopReason(NULL), typeName(aTypeName), inCall(NULL)
+ stopReason(NULL), typeName(aTypeName), inCall(NULL)
{
debugs(93,5, "AsyncJob constructed, this=" << this <<
" type=" << typeName << " [" << id << ']');
// This may happen when we have bugs or some module is not calling
// us asynchronously (comm used to do that).
debugs(93, 5, HERE << inCall << " is in progress; " <<
- call << " canot reenter the job.");
+ call << " cannot reenter the job.");
return call.cancel("reentrant job call");
}
typeName << " status in:" << status());
}
-void AsyncJob::callException(const std::exception &e)
+void
+AsyncJob::callException(const std::exception &ex)
{
+ debugs(93, 2, ex.what());
// we must be called asynchronously and hence, the caller must lock us
Must(cbdataReferenceValid(toCbdata()));
buf.append(" [", 2);
if (stopReason != NULL) {
- buf.Printf("Stopped, reason:");
- buf.Printf("%s",stopReason);
+ buf.appendf("Stopped, reason:%s", stopReason);
}
- buf.Printf(" %s%u]", id.Prefix, id.value);
+ buf.appendf(" %s%u]", id.prefix(), id.value);
buf.terminate();
return buf.content();