Changeset View
Changeset View
Standalone View
Standalone View
src/core/errorcode.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | knewstuff3/errorcode.h. | ||||
3 | Copyright (c) 2018 Dan Leinir Turthra Jensen <admin@leinir.dk> | ||||
4 | | ||||
5 | This library is free software; you can redistribute it and/or | ||||
6 | modify it under the terms of the GNU Lesser General Public | ||||
7 | License as published by the Free Software Foundation; either | ||||
8 | version 2.1 of the License, or (at your option) any later version. | ||||
9 | | ||||
10 | This library is distributed in the hope that it will be useful, | ||||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
13 | Lesser General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU Lesser General Public | ||||
16 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
17 | */ | ||||
18 | | ||||
19 | | ||||
20 | #ifndef KNSCORE_ERRORCODE_H | ||||
21 | #define KNSCORE_ERRORCODE_H | ||||
22 | | ||||
23 | namespace KNSCore { | ||||
24 | /** | ||||
25 | * An enumeration of specific error conditions which might occur and which | ||||
26 | * users of KNewStuff would want to react to. It is used by both the Engine and | ||||
27 | * Provider classes. | ||||
28 | */ | ||||
29 | enum ErrorCode { | ||||
30 | UnknownError, // An unknown error (this should not be used, an error report of this nature should be considered a bug) | ||||
31 | NetworkError, // A network error. In signalErrorCode, this will be accompanied by the QtNetwork error code in the metadata | ||||
32 | OcsError, // An error reported by the OCS API server. In signalErrorCode, this will be accompanied by the OCS error code in the metadata | ||||
33 | ConfigFileError, // The configuration file is missing or somehow incorrect. The configuration file filename will be held in the metadata | ||||
34 | ProviderError, // A provider has failed to load or initialize. The provider file URL or provider URL will be held in the metadata | ||||
35 | InstallationError, // Installation of a content item has failed | ||||
36 | ImageError // Loading an image has failed. The entry name and preview type which failed will be held in the metadata as a QVariantList | ||||
37 | }; | ||||
38 | } | ||||
39 | #endif//KNSCORE_ERRORCODE_H |