btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / package / Exception.cpp
blobd00b930a596ae3fc96974751aaa5c4e5196d0dba
1 /*
2 * Copyright 2013-2014, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "Exception.h"
10 using namespace BPackageKit;
13 Exception::Exception(BTransactionError error)
15 fError(error),
16 fSystemError(B_ERROR),
17 fPackageName(),
18 fPath1(),
19 fPath2(),
20 fString1(),
21 fString2()
25 Exception&
26 Exception::SetSystemError(status_t error)
28 fSystemError = error;
29 return *this;
33 Exception&
34 Exception::SetPackageName(const BString& packageName)
36 fPackageName = packageName;
37 return *this;
41 Exception&
42 Exception::SetPath1(const BString& path)
44 fPath1 = path;
45 return *this;
49 Exception&
50 Exception::SetPath2(const BString& path)
52 fPath2 = path;
53 return *this;
57 Exception&
58 Exception::SetString1(const BString& string)
60 fString1 = string;
61 return *this;
65 Exception&
66 Exception::SetString2(const BString& string)
68 fString2 = string;
69 return *this;
73 void
74 Exception::SetOnResult(BCommitTransactionResult& result)
76 result.SetError(fError);
77 result.SetSystemError(fSystemError);
78 result.SetErrorPackage(fPackageName);
79 result.SetPath1(fPath1);
80 result.SetPath2(fPath2);
81 result.SetString1(fString1);
82 result.SetString2(fString2);