[FarGroup/FarManager] master: Correction of 6690 (222846553)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Jun 5, 2026, 6:15:58 AM (13 days ago) Jun 5
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/2228465537afa76227625bee446107d6665a0911

>---------------------------------------------------------------

commit 2228465537afa76227625bee446107d6665a0911
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Fri Jun 5 11:00:02 2026 +0100

Correction of 6690


>---------------------------------------------------------------

2228465537afa76227625bee446107d6665a0911
far/changelog | 7 ++++++-
far/exception.cpp | 4 ++--
far/platform.cpp | 24 +++++++++++++-----------
far/vbuild.m4 | 2 +-
4 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/far/changelog b/far/changelog
index 720ee95a9..8eabaa115 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,7 +1,12 @@
+--------------------------------------------------------------------------------
+drkns 2026-06-05 10:59:16+01:00 - build 6692
+
+1. Correction of 6690.
+
--------------------------------------------------------------------------------
yjh 2026-06-05 01:19:04+03:00 - build 6691

-1. SQLite v3.53.1
+1. SQLite v3.53.2

--------------------------------------------------------------------------------
drkns 2026-05-29 22:43:21+01:00 - build 6690
diff --git a/far/exception.cpp b/far/exception.cpp
index cad3365d5..d3274cab1 100644
--- a/far/exception.cpp
+++ b/far/exception.cpp
@@ -77,7 +77,7 @@ namespace detail
{
string far_base_exception::to_string() const
{
- return with_exception_stacktrace(far::format(L"far_base_exception: {{{}}}"sv, error_state_ex::to_string()));
+ return with_exception_stacktrace(far::format(L"Exception: {{{}}}"sv, error_state_ex::to_string()));
}

far_base_exception::far_base_exception(error_state_ex ErrorState):
@@ -240,7 +240,7 @@ TEST_CASE("far_exception")
REQUIRE(e.message() == Message);

REQUIRE(far::format(L"{}"sv, e) == far::format(
- L"far_base_exception: {{Message: {}, Error: {{errno: {}, LastError: {}, NTSTATUS: {}}} ({})}}"sv,
+ L"Exception: {{Message: {}, Error: {{errno: {}, LastError: {}, NTSTATUS: {}}} ({})}}"sv,
Message,
os::format_errno(Errno),
os::format_error(Win32Error),
diff --git a/far/platform.cpp b/far/platform.cpp
index 80aaff3aa..9fe5476e8 100644
--- a/far/platform.cpp
+++ b/far/platform.cpp
@@ -427,7 +427,9 @@ string error_state::to_string_base() const

string error_state::to_string() const
{
- return far::format(L"Error: {{{}}} ({})"sv, to_string_base(), source_location_to_string(Location));
+ return Location.file_name()?
+ far::format(L"Error: {{{}}} ({})"sv, to_string_base(), source_location_to_string(Location)) :
+ far::format(L"Error: {{{}}}"sv, to_string_base());
}

error_state last_error(source_location const& Location)
@@ -1188,28 +1190,28 @@ TEST_CASE("error_state")
{
DWORD Win32Error;
NTSTATUS NtError;
+ source_location Location;
}
Tests[]
{
- { ERROR_SUCCESS, STATUS_SUCCESS },
- { ERROR_SUCCESS, STATUS_GUARD_PAGE_VIOLATION },
- { ERROR_ARENA_TRASHED, STATUS_SUCCESS },
- { ERROR_ARENA_TRASHED, STATUS_GUARD_PAGE_VIOLATION },
+ { ERROR_SUCCESS, STATUS_SUCCESS, source_location::current() },
+ { ERROR_SUCCESS, STATUS_GUARD_PAGE_VIOLATION, {} },
+ { ERROR_ARENA_TRASHED, STATUS_SUCCESS, source_location::current() },
+ { ERROR_ARENA_TRASHED, STATUS_GUARD_PAGE_VIOLATION, {} },
};

for (const auto& i: Tests)
{
- const auto Location = source_location::current();
- const auto ErrorState = os::error_state(i.Win32Error, i.NtError, Location);
+ const auto ErrorState = os::error_state(i.Win32Error, i.NtError, i.Location);

const auto Any = i.Win32Error != ERROR_SUCCESS || i.NtError != STATUS_SUCCESS;

REQUIRE(ErrorState.any() == Any);
REQUIRE(ErrorState.Win32Error == i.Win32Error);
REQUIRE(ErrorState.NtError == i.NtError);
- REQUIRE(ErrorState.Location.file_name() == Location.file_name());
- REQUIRE(ErrorState.Location.function_name() == Location.function_name());
- REQUIRE(ErrorState.Location.line() == Location.line());
+ REQUIRE(ErrorState.Location.file_name() == i.Location.file_name());
+ REQUIRE(ErrorState.Location.function_name() == i.Location.function_name());
+ REQUIRE(ErrorState.Location.line() == i.Location.line());

const auto Win32ErrorStr = os::format_error(i.Win32Error);
REQUIRE(ErrorState.Win32ErrorStr() == Win32ErrorStr);
@@ -1225,7 +1227,7 @@ TEST_CASE("error_state")

const auto FullStr = join(L", "sv, ErrorStrings | std::views::filter([](string const& Str) { return !Str.empty(); }));

- REQUIRE(far::format(L"{}"sv, ErrorState) == far::format(L"Error: {{{}}} ({})"sv, FullStr, source_location_to_string(Location)));
+ REQUIRE(far::format(L"{}"sv, ErrorState) == far::format(L"Error: {{{}}}{}"sv, FullStr, i.Location.file_name()? far::format(L" ({})"sv, source_location_to_string(i.Location)) : L""s));
}
}
#endif
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 48e508416..6b1a4f447 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6691
+6692


Reply all
Reply to author
Forward
0 new messages