Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e814b0e authored by Bart Van Assche's avatar Bart Van Assche
Browse files

Make two error messages more detailed



Provide context information to make it easier to map error messages to
the source code that reported these error messages.

Bug: 213617178
Test: Booted Android in Cuttlefish and verified the error messages in logcat.
Change-Id: I22e6d91476d91dcf32bafe5ead922e5652136584
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 6856cfcb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ void removeAllProcessGroups() {
    for (std::string cgroup_root_path : cgroups) {
        std::unique_ptr<DIR, decltype(&closedir)> root(opendir(cgroup_root_path.c_str()), closedir);
        if (root == NULL) {
            PLOG(ERROR) << "Failed to open " << cgroup_root_path;
            PLOG(ERROR) << __func__ << " failed to open " << cgroup_root_path;
        } else {
            dirent* dir;
            while ((dir = readdir(root.get())) != nullptr) {
@@ -297,7 +297,8 @@ static int DoKillProcessGroupOnce(const char* cgroup, uid_t uid, int initialPid,
            // This happens when process is already dead
            return 0;
        }
        PLOG(WARNING) << "Failed to open process cgroup uid " << uid << " pid " << initialPid;
        PLOG(WARNING) << __func__ << " failed to open process cgroup uid " << uid << " pid "
                      << initialPid;
        return -1;
    }