diff --git a/src/DialogMain.cpp b/src/DialogMain.cpp index e2292aa..1c896f9 100644 --- a/src/DialogMain.cpp +++ b/src/DialogMain.cpp @@ -18,7 +18,7 @@ #undef min #undef max -const std::tstring appTitle = TEXT("SmartCharsetConverter v0.9.1 by Tom Willow"); +const std::tstring appTitle = TEXT("SmartCharsetConverter v0.9.2 by Tom Willow"); const std::tstring configFileName = TEXT("SmartCharsetConverter.json"); @@ -53,7 +53,9 @@ DialogMain::DialogMain(const std::vector &filenames) : inputFilena option.resourceIds = innerLanguageIds; option.resourceType = L"LanguageJson"; InitLanguageService(option); - } catch (const nlohmann::json::exception &err) { throw; } catch (const std::exception &err) { + } catch (const nlohmann::json::exception &err) { + throw; + } catch (const std::exception &err) { throw; } } @@ -316,7 +318,9 @@ std::vector DialogMain::AddItems(const std::vector & PostUIFunc([filename, ret, this]() { AppendListViewItem(filename, ret.filesize, ret.srcCharset, ret.srcLineBreak, ret.strPiece); }); - } catch (io_error_ignore) { ignored.push_back(filename); } catch (const runtime_error &err) { + } catch (io_error_ignore) { + ignored.push_back(filename); + } catch (const runtime_error &err) { failed.push_back({filename, err.what()}); } }; @@ -793,7 +797,9 @@ LRESULT DialogMain::OnSpecifyOriginCharset(WORD /*wNotifyCode*/, WORD wID, HWND auto filename = listview.GetItemText(index, static_cast(ListViewColumn::FILENAME)); try { core->SpecifyItemCharset(index, filename, code); - } catch (const std::runtime_error &err) { failed.push_back({filename, utf8_to_wstring(err.what())}); } + } catch (const std::runtime_error &err) { + failed.push_back({filename, utf8_to_wstring(err.what())}); + } } if (!failed.empty()) {