|
| 1 | +//****************************************************************************** |
| 2 | +// Copyright (C) 1999 Jim Wanner and the SourceMonitor team. |
| 3 | +// |
| 4 | +// Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | +// copy of this software and associated documentation files (the "Software"), |
| 6 | +// to deal in the Software without restriction, including without limitation |
| 7 | +// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | +// and/or sell copies of the Software, and to permit persons to whom the |
| 9 | +// Software is furnished to do so, subject to the following conditions: |
| 10 | +// |
| 11 | +// The above copyright notice and this permission notice shall be included |
| 12 | +// in all copies or substantial portions of the Software. |
| 13 | +// |
| 14 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 | +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 | +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 19 | +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 20 | +// DEALINGS IN THE SOFTWARE. |
| 21 | +//****************************************************************************** |
| 22 | + |
| 23 | +#pragma once |
| 24 | + |
| 25 | +#include <QString> |
| 26 | +#include "smcore_global.h" |
| 27 | + |
| 28 | +// See error class in C++ with enum |
| 29 | +// https://stackoverflow.com/questions/21295935/can-a-c-enum-class-have-methods |
| 30 | +// And how to convert enum to string |
| 31 | +// https://stackoverflow.com/questions/28828957/enum-to-string-in-modern-c11-c14-c17-and-future-c20 |
| 32 | + |
| 33 | +namespace smos |
| 34 | +{ |
| 35 | + namespace smcore |
| 36 | + { |
| 37 | + class SMCORE_EXPORT Error |
| 38 | + { |
| 39 | + public: |
| 40 | + enum ErrorCode |
| 41 | + { |
| 42 | + ERR_EVERYTHING_OK = 0, |
| 43 | + ERR_PROJECT_DOES_NOT_EXIST, |
| 44 | + ERR_PROJECT_INVALID, |
| 45 | + }; |
| 46 | + }; |
| 47 | + } |
| 48 | +} |
0 commit comments