mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 16:49:22 +08:00
packages.biu: remove unused Logger::Exception class
This commit is contained in:
@@ -53,15 +53,6 @@ namespace biu
|
||||
// List of objects that is being monitored by ObjectMonitor, {address, type}
|
||||
protected: static Atomic<std::multimap<const void*, std::string_view>> Objects_;
|
||||
|
||||
public: template <typename FinalException> class Exception : public std::exception
|
||||
{
|
||||
protected: const std::string Message_;
|
||||
protected: const boost::stacktrace::stacktrace Stacktrace_;
|
||||
|
||||
public: explicit Exception(const std::string& message);
|
||||
public: const char* what() const noexcept final {return Message_.c_str();}
|
||||
};
|
||||
|
||||
public: template <typename Function> static void try_exec(Function&& function);
|
||||
|
||||
// Monitor the start and end of a function, as well as corresponding thread.
|
||||
|
||||
@@ -63,13 +63,6 @@ namespace biu
|
||||
}
|
||||
inline Atomic<std::multimap<const void*, std::string_view>> Logger::Objects_;
|
||||
|
||||
template <typename FinalException> Logger::Exception<FinalException>::Exception(const std::string& message)
|
||||
{
|
||||
Logger::Guard log(message);
|
||||
log.print_exception
|
||||
(std::pair<std::string, std::string>(nameof::nameof_full_type<FinalException>(), message), Stacktrace_);
|
||||
}
|
||||
|
||||
template <typename Function> inline void Logger::try_exec(Function&& function)
|
||||
{
|
||||
Logger::Guard log;
|
||||
|
||||
Reference in New Issue
Block a user