WSF
USMTF_Exceptions.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12
13#ifndef USMTFEXCPEPTIONS_HPP
14#define USMTFEXCPEPTIONS_HPP
15
16#include "usmtf_export.h"
17
18#include <stdexcept>
19#include <string>
20#include <vector>
21
22namespace usmtf
23{
28
30class USMTF_EXPORT ImportError : public std::runtime_error
31{
32public:
33 explicit ImportError(const std::string& aWhatHappened) noexcept;
34};
35
37class USMTF_EXPORT ExportError : public std::runtime_error
38{
39public:
40 explicit ExportError(const std::string& aWhatHappened) noexcept;
41};
42
44class USMTF_EXPORT MessageError : public std::runtime_error
45{
46public:
47 explicit MessageError(const std::string& aWhatHappened) noexcept;
48};
49
51class USMTF_EXPORT SetError : public std::runtime_error
52{
53public:
54 explicit SetError(const std::string& aWhatHappened, size_t aOptionalPosition = 0) noexcept;
55 size_t GetPosition() const noexcept;
56
57private:
58 size_t mOptionalPosition;
59};
60
62class USMTF_EXPORT ValidationError : public std::runtime_error
63{
64public:
65 ValidationError(const std::string& aFailureReason,
66 const std::string& aValueValidatied,
67 const std::string& aOptionalSuggestion = "") noexcept;
68 explicit ValidationError(const std::string& aSeperator) noexcept;
69
70private:
71 const std::string ConstructError(const std::string& aFailureReason,
72 const std::string& aValueValidatied,
73 const std::string& aSuggestion) noexcept;
74};
75} // namespace usmtf
76
77#endif
ExportError(const std::string &aWhatHappened) noexcept
Definition USMTF_Exceptions.cpp:28
ImportError(const std::string &aWhatHappened) noexcept
Definition USMTF_Exceptions.cpp:23
MessageError(const std::string &aWhatHappened) noexcept
Definition USMTF_Exceptions.cpp:33
SetError(const std::string &aWhatHappened, size_t aOptionalPosition=0) noexcept
Definition USMTF_Exceptions.cpp:38
size_t GetPosition() const noexcept
Definition USMTF_Exceptions.cpp:44
ValidationError(const std::string &aFailureReason, const std::string &aValueValidatied, const std::string &aOptionalSuggestion="") noexcept
Definition USMTF_Exceptions.cpp:49
Definition Acmid.cpp:17
Copyrights Multiple, All Rights Reserved