Skip to content

Commit 26cf9ea

Browse files
committed
scripted-diff: rename pszThread to thread_name
Since it is now a string_view instead of a const char*, update the name to reflect that the variable is no longer a "Pointer to String, Zero-terminated" (psz). -BEGIN VERIFY SCRIPT- sed -i s/pszThread/thread_name/ $(git grep -l pszThread src) -END VERIFY SCRIPT-
1 parent 200d84d commit 26cf9ea

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/util/system.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ std::string HelpMessageOpt(const std::string &option, const std::string &message
831831
std::string("\n\n");
832832
}
833833

834-
static std::string FormatException(const std::exception* pex, std::string_view pszThread)
834+
static std::string FormatException(const std::exception* pex, std::string_view thread_name)
835835
{
836836
#ifdef WIN32
837837
char pszModule[MAX_PATH] = "";
@@ -841,15 +841,15 @@ static std::string FormatException(const std::exception* pex, std::string_view p
841841
#endif
842842
if (pex)
843843
return strprintf(
844-
"EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread);
844+
"EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, thread_name);
845845
else
846846
return strprintf(
847-
"UNKNOWN EXCEPTION \n%s in %s \n", pszModule, pszThread);
847+
"UNKNOWN EXCEPTION \n%s in %s \n", pszModule, thread_name);
848848
}
849849

850-
void PrintExceptionContinue(const std::exception* pex, std::string_view pszThread)
850+
void PrintExceptionContinue(const std::exception* pex, std::string_view thread_name)
851851
{
852-
std::string message = FormatException(pex, pszThread);
852+
std::string message = FormatException(pex, thread_name);
853853
LogPrintf("\n\n************************\n%s\n", message);
854854
tfm::format(std::cerr, "\n\n************************\n%s\n", message);
855855
}

src/util/system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool error(const char* fmt, const Args&... args)
5151
return false;
5252
}
5353

54-
void PrintExceptionContinue(const std::exception* pex, std::string_view pszThread);
54+
void PrintExceptionContinue(const std::exception* pex, std::string_view thread_name);
5555

5656
/**
5757
* Ensure file contents are fully committed to disk, using a platform-specific

0 commit comments

Comments
 (0)