Log: remove the obsolete class Error overloads

This commit is contained in:
Max Kellermann 2016-11-10 12:52:39 +01:00
parent 741c6f1179
commit a17abc5557
2 changed files with 0 additions and 44 deletions

View File

@ -98,8 +98,6 @@ LogError(const std::exception &e)
std::rethrow_if_nested(e);
} catch (const std::exception &nested) {
LogError(nested, "nested");
} catch (const Error &nested) {
LogError(nested, "nested");
} catch (...) {
Log(exception_domain, LogLevel::ERROR,
"Unrecognized nested exception");
@ -115,8 +113,6 @@ LogError(const std::exception &e, const char *msg)
std::rethrow_if_nested(e);
} catch (const std::exception &nested) {
LogError(nested);
} catch (const Error &nested) {
LogError(nested);
} catch (...) {
Log(exception_domain, LogLevel::ERROR,
"Unrecognized nested exception");
@ -142,8 +138,6 @@ LogError(const std::exception_ptr &ep)
std::rethrow_exception(ep);
} catch (const std::exception &e) {
LogError(e);
} catch (const Error &e) {
LogError(e);
} catch (...) {
Log(exception_domain, LogLevel::ERROR,
"Unrecognized exception");
@ -157,8 +151,6 @@ LogError(const std::exception_ptr &ep, const char *msg)
std::rethrow_exception(ep);
} catch (const std::exception &e) {
LogError(e, msg);
} catch (const Error &e) {
LogError(e, msg);
} catch (...) {
FormatError(exception_domain,
"%s: Unrecognized exception", msg);
@ -177,31 +169,6 @@ FormatError(const std::exception_ptr &ep, const char *fmt, ...)
LogError(ep, msg);
}
void
LogError(const Error &error)
{
Log(error.GetDomain(), LogLevel::ERROR, error.GetMessage());
}
void
LogError(const Error &error, const char *msg)
{
LogFormat(error.GetDomain(), LogLevel::ERROR, "%s: %s",
msg, error.GetMessage());
}
void
FormatError(const Error &error, const char *fmt, ...)
{
char msg[1024];
va_list ap;
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
LogError(error, msg);
}
void
LogErrno(const Domain &domain, int e, const char *msg)
{

View File

@ -25,7 +25,6 @@
#include <exception>
class Error;
class Domain;
void
@ -105,16 +104,6 @@ gcc_printf(2,3)
void
FormatError(const Domain &domain, const char *fmt, ...);
void
LogError(const Error &error);
void
LogError(const Error &error, const char *msg);
gcc_printf(2,3)
void
FormatError(const Error &error, const char *fmt, ...);
void
LogErrno(const Domain &domain, int e, const char *msg);