UnexpectedEnumValueException.cpp
Go to the documentation of this file.
1
#include "
UnexpectedEnumValueException.h
"
2
3
#include <Ice/Properties.h>
4
5
#include "
MissingRequiredPropertyException.h
"
6
7
namespace
armarx::exceptions::local
8
{
9
10
UnexpectedEnumValueException::UnexpectedEnumValueException
(
const
std::string& enumName,
11
int
value
) :
12
armarx
::LocalException(
"Unexpected value of enum "
+ enumName +
": "
+
13
std
::
to_string
(
value
)),
14
enumName(enumName),
15
value
(
value
)
16
{
17
}
18
19
const
std::string&
20
UnexpectedEnumValueException::getEnumName
()
const
21
{
22
return
enumName;
23
}
24
25
int
26
UnexpectedEnumValueException::getValue
()
const
27
{
28
return
value;
29
}
30
31
MissingRequiredPropertyException::MissingRequiredPropertyException
(
32
std::string propertyName,
33
Ice::PropertiesPtr
const
& properties) :
34
propertyName(propertyName)
35
{
36
std::stringstream
str
;
37
str
<<
" Missing required property <"
+
propertyName
+
">"
;
38
39
if
(properties)
40
{
41
str
<<
"\nAvailable Properties: "
<< properties->getPropertiesForPrefix(
""
);
42
}
43
44
setReason(
str
.str());
45
}
46
47
}
// namespace armarx::exceptions::local
str
std::string str(const T &t)
Definition:
UserAssistedSegmenterGuiWidgetController.cpp:43
armarx::exceptions::local::MissingRequiredPropertyException::MissingRequiredPropertyException
MissingRequiredPropertyException(std::string propertyName, Ice::PropertiesPtr const &properties)
Definition:
UnexpectedEnumValueException.cpp:31
UnexpectedEnumValueException.h
armarx::exceptions::local::UnexpectedEnumValueException::UnexpectedEnumValueException
UnexpectedEnumValueException(const std::string &enumName, int value)
Constructor.
Definition:
UnexpectedEnumValueException.cpp:10
IceInternal::Handle<::Ice::Properties >
cxxopts::value
std::shared_ptr< Value > value()
Definition:
cxxopts.hpp:855
armarx::exceptions::local
Definition:
DynamicLibraryException.h:31
armarx::exceptions::local::UnexpectedEnumValueException::getEnumName
const std::string & getEnumName() const
Get the name of the enum type.
Definition:
UnexpectedEnumValueException.cpp:20
armarx::to_string
const std::string & to_string(const std::string &s)
Definition:
StringHelpers.h:41
MissingRequiredPropertyException.h
std
Definition:
Application.h:66
armarx::exceptions::local::MissingRequiredPropertyException::propertyName
std::string propertyName
Definition:
MissingRequiredPropertyException.h:51
armarx::exceptions::local::UnexpectedEnumValueException::getValue
int getValue() const
Get the encountered enum value.
Definition:
UnexpectedEnumValueException.cpp:26
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:27
ArmarXCore
core
exceptions
local
UnexpectedEnumValueException.cpp
Generated by
1.8.17