API Documentation
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: Exception
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/File.h>
34#include "Exception.hpp"
35
36namespace NDEVR
37{
38
39 class FileException : public Exception
40 {
41 public:
54
55 public:
56 NDEVR_BASE_API explicit FileException(const File& file, ExceptionType type = e_generic);
57 NDEVR_BASE_API FileException(const File& file, const TranslatedString& message, ExceptionType type = e_generic);
58 const File& getFile() const { return m_file; }
59 ExceptionType getType() const { return m_type; }
60 private:
61 void createDescription(const TranslatedString& message);
62 File m_file;
63 const ExceptionType m_type;
64 };
66 {
67 public:
69 };
70}
71
72
#define NDEVR_BASE_API
Definition DLLInfo.h:78
Definition Exception.h:66
NDEVR_BASE_API CancelException(const TranslatedString &message)
Definition Exception.cpp:127
Definition Exception.hpp:56
Definition Exception.h:40
ExceptionType
Definition Exception.h:43
@ e_file_exits
Definition Exception.h:48
@ e_file_invalid
Definition Exception.h:49
@ e_no_create
Definition Exception.h:52
@ e_does_not_exist
Definition Exception.h:47
@ e_not_supported
Definition Exception.h:51
@ e_no_open
Definition Exception.h:45
@ e_generic
Definition Exception.h:44
@ e_already_open
Definition Exception.h:46
@ e_checksum_failed
Definition Exception.h:50
ExceptionType getType() const
Definition Exception.h:59
NDEVR_BASE_API FileException(const File &file, ExceptionType type=e_generic)
Definition Exception.cpp:85
const File & getFile() const
Definition Exception.h:58
Definition File.h:47
Definition TranslatedString.h:9
Definition ACIColor.h:37