]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- store user/group in exception
authorArvin Schnell <aschnell@suse.de>
Wed, 23 Jul 2025 09:08:08 +0000 (11:08 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 23 Jul 2025 09:08:08 +0000 (11:08 +0200)
snapper/Exception.h

index d06be7b94ae57f728bd342331f52f533d4f05019..a942e02a2b6e4a70179b2c0c26815f82582cc039 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2011-2014] Novell, Inc.
- * Copyright (c) [2015-2023] SUSE LLC
+ * Copyright (c) [2015-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -384,20 +384,25 @@ namespace snapper
        explicit XAttributesException() : Exception("XAttributes error") {}
     };
 
+
     struct InvalidUserException : public Exception
     {
-       explicit InvalidUserException() __attribute__((deprecated)) : Exception("invalid user") {}
-       explicit InvalidUserException(const std::string& user) : Exception("invalid user '" + user + "'") {}
-       // TODO save user
+       explicit InvalidUserException(const std::string& user)
+           : Exception("invalid user '" + user + "'"), user(user) {}
+
+       const std::string user;
     };
 
+
     struct InvalidGroupException : public Exception
     {
-       explicit InvalidGroupException() __attribute__((deprecated)) : Exception("invalid group") {}
-       explicit InvalidGroupException(const std::string& group) : Exception("invalid group '" + group + "'") {}
-       // TODO save group
+       explicit InvalidGroupException(const std::string& group)
+           : Exception("invalid group '" + group + "'"), group(group) {}
+
+       const std::string group;
     };
 
+
     struct UnsupportedException : public Exception
     {
        explicit UnsupportedException() : Exception("unsupported") {}