2 * Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
8 #ifndef _PACKAGE__MANAGER__PRIVATE__EXCEPTIONS_H_
9 #define _PACKAGE__MANAGER__PRIVATE__EXCEPTIONS_H_
12 #include <package/CommitTransactionResult.h>
13 #include <package/Context.h>
16 namespace BPackageKit
{
26 BException(const BString
& message
);
28 const BString
& Message() const
36 class BFatalErrorException
: public BException
{
38 BFatalErrorException();
39 BFatalErrorException(const char* format
, ...);
40 BFatalErrorException(status_t error
,
41 const char* format
, ...);
43 const BCommitTransactionResult
& result
);
45 const BString
& Details() const
47 BFatalErrorException
& SetDetails(const BString
& details
);
49 status_t
Error() const
52 bool HasCommitTransactionFailed() const
53 { return fCommitTransactionFailed
; }
54 const BCommitTransactionResult
& CommitTransactionResult() const
55 { return fCommitTransactionResult
; }
60 BCommitTransactionResult fCommitTransactionResult
;
61 bool fCommitTransactionFailed
;
65 class BAbortedByUserException
: public BException
{
67 BAbortedByUserException();
71 class BNothingToDoException
: public BException
{
73 BNothingToDoException();
77 } // namespace BPrivate
79 } // namespace BManager
81 } // namespace BPackageKit
84 #endif // _PACKAGE__MANAGER__PRIVATE__EXCEPTIONS_H_