Error.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeUnstructGrid/Base.h"
16 #include "CeeCore/Str.h"
17 
18 namespace cee {
19 namespace ug {
20 
21 
22 //==================================================================================================
23 //
24 //
25 //
26 //==================================================================================================
27 class CEE_UG_EXPORT Error
28 {
29 public:
31  enum Code
32  {
37 
43  ERR_VTFX_WRONG_PASSWORD
44  };
45 
46 public:
47  Error();
48 
49  Code errorCode() const;
50  void setErrorCode(Code errorCode);
51  Str userDefinedErrorMessage() const;
52  void setUserDefinedError(const Str& errorMessage);
53 
54  static void safeSetErrorCode(Error* errorObj, Code errorCode);
55  static void safeSetUserDefinedError(Error* errorObj, const Str& errorMessage);
56 
57 private:
58  Code m_errorCode;
59  Str m_userDefinedErrorMessage;
60 };
61 
62 } // namespace ug
63 } // namespace cee
64 
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
File not found.
Definition: Error.h:38
Unsupported file type. E.g. Not a VTF file.
Definition: Error.h:41
A general unicode based string class.
Definition: Str.h:28
A user defined message.
Definition: Error.h:36
Code
Available error codes.
Definition: Error.h:31
Error opening file
Definition: Error.h:39
Error not set
Definition: Error.h:33
Inconsistent data.
Definition: Error.h:35
Error reading file
Definition: Error.h:40
Internal errors in the file. File does not comply to the file specification.
Definition: Error.h:42
Error object for simple error management
Definition: Error.h:27
Aborted by user.
Definition: Error.h:34