mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-10-06 01:53:53 +02:00
logging: revert recusion catch & use logv_string to not emit error
This commit is contained in:
+2
-3
@@ -237,7 +237,7 @@ void LogManager::logv_string(LogSeverity severity, LogSourceLocation src, std::s
|
||||
|
||||
void LogManager::formatted_string(LogSeverity severity, LogSourceLocation src, std::string_view prefix, std::string_view format, std::string str)
|
||||
{
|
||||
if (!handling_err) log_assert(!Multithreading::active());
|
||||
log_assert(!Multithreading::active());
|
||||
|
||||
if (make_debug && !is_debug(1))
|
||||
return;
|
||||
@@ -351,7 +351,7 @@ void LogManager::error_with_prefix(LogSeverity severity, LogSourceLocation src,
|
||||
if (severity == LogSeverity::Error)
|
||||
suppressed();
|
||||
|
||||
formatted_string(severity, src, prefix, format, message);
|
||||
logv_string(severity, src, prefix, format, message);
|
||||
flush();
|
||||
|
||||
make_debug = bak_make_debug;
|
||||
@@ -372,7 +372,6 @@ void LogManager::error_with_prefix(LogSeverity severity, LogSourceLocation src,
|
||||
[[noreturn]]
|
||||
void LogManager::formatted_error(LogSourceLocation src, std::string_view prefix, std::string_view format, std::string message)
|
||||
{
|
||||
handling_err = true;
|
||||
error_with_prefix(LogSeverity::Error, src, prefix, format, message);
|
||||
|
||||
check_expected();
|
||||
|
||||
@@ -466,7 +466,6 @@ private:
|
||||
int make_debug = 0;
|
||||
int force_debug = 0;
|
||||
std::unique_ptr<SHA1> hasher;
|
||||
bool handling_err;
|
||||
};
|
||||
|
||||
LogManager &logger();
|
||||
|
||||
Reference in New Issue
Block a user