Discovered that modifying the wxWidgets manifest has no effect
Restored the wallet manifest. Discovered that local wxString variables are apt to get wiped during a throw. Dangerous to pass a wXstring.utf8() to an exception
This commit is contained in:
parent
883bd8ebe8
commit
fefb99bb33
@ -80,13 +80,14 @@
|
||||
<AdditionalDependencies>mpir.lib;mpirxx.lib;libsodium.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>wallet.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
<AdditionalManifestFiles>
|
||||
</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<Manifest>
|
||||
<GenerateCategoryTags>false</GenerateCategoryTags>
|
||||
<GenerateCategoryTags>true</GenerateCategoryTags>
|
||||
</Manifest>
|
||||
<Manifest>
|
||||
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
|
||||
<EnableDpiAwareness>false</EnableDpiAwareness>
|
||||
</Manifest>
|
||||
<ResourceCompile />
|
||||
<CustomBuildStep />
|
||||
@ -123,6 +124,9 @@
|
||||
<CustomBuildStep />
|
||||
<CustomBuildStep />
|
||||
<CustomBuildStep />
|
||||
<Manifest>
|
||||
<GenerateCategoryTags>true</GenerateCategoryTags>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="../src/app.h" />
|
||||
|
@ -25,7 +25,7 @@ void sqlite3_init() {
|
||||
errorCode = 7;
|
||||
szError = "Fatal Error: Sqlite library did not init.";
|
||||
// Cannot log the error, because logging not set up yet, so logging itself causes an exception
|
||||
throw FatalException(szError.c_str());
|
||||
throw FatalException(szError);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,27 +264,26 @@ static bool checkDataConversionsProduceExpected(void){
|
||||
}
|
||||
|
||||
static bool CheckForUtfEnvironment(void) {
|
||||
ILogMessage("\tChecking for UTF locale.");
|
||||
ILogMessage("\tChecking for UTF locale. ☹");
|
||||
try {
|
||||
bool utfEnvironment{ true };
|
||||
wxString utfError{ wxT("") };
|
||||
if constexpr (b_WINDOWS) {
|
||||
auto ACP{ GetACP() };
|
||||
// Check that windows thinks this is UTF8
|
||||
utfEnvironment = utfEnvironment && (ACP == 65001);
|
||||
if (!utfEnvironment) {
|
||||
utfError += wxString::Format(wxT("current code page %d—should be 65001☹, "), ACP);
|
||||
szError = std::format("current code page {}, —should be 65001☹, ", ACP);
|
||||
}
|
||||
}
|
||||
auto FontEncoding{ wxLocale::GetSystemEncoding() };
|
||||
// check that wxWidgets thinks this is UTF8
|
||||
utfEnvironment = utfEnvironment && (FontEncoding == wxFONTENCODING_UTF8);
|
||||
if (!utfEnvironment) {
|
||||
utfError = wxString::Format(wxT("%swxFontEncoding %d—should be %d☹"),
|
||||
utfError,
|
||||
FontEncoding,
|
||||
wxFONTENCODING_UTF8);
|
||||
throw MyException(utfError.c_str(), __LINE__, __func__, SrcFilename);
|
||||
szError += std::format("swxFontEncoding {}, – should be {} ☹",
|
||||
(int)FontEncoding,
|
||||
(int)wxFONTENCODING_UTF8
|
||||
);
|
||||
throw MyException(szError, __LINE__, __func__, SrcFilename);
|
||||
}
|
||||
}
|
||||
catch (const MyException& e) {
|
||||
|
Loading…
Reference in New Issue
Block a user