Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
c8a539f4
Commit
c8a539f4
authored
May 19, 2012
by
Jesse Beder
Browse files
Removed old api exceptions
parent
683c60f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
63 deletions
+0
-63
include/yaml-cpp/exceptions.h
include/yaml-cpp/exceptions.h
+0
-63
No files found.
include/yaml-cpp/exceptions.h
View file @
c8a539f4
...
...
@@ -55,10 +55,6 @@ namespace YAML
const
char
*
const
AMBIGUOUS_ANCHOR
=
"cannot assign the same alias to multiple nodes"
;
const
char
*
const
UNKNOWN_ANCHOR
=
"the referenced anchor is not defined"
;
const
char
*
const
INVALID_SCALAR
=
"invalid scalar"
;
const
char
*
const
KEY_NOT_FOUND
=
"key not found"
;
const
char
*
const
BAD_DEREFERENCE
=
"bad dereference"
;
const
char
*
const
UNMATCHED_GROUP_TAG
=
"unmatched group tag"
;
const
char
*
const
UNEXPECTED_END_SEQ
=
"unexpected end sequence token"
;
const
char
*
const
UNEXPECTED_END_MAP
=
"unexpected end map token"
;
...
...
@@ -70,24 +66,6 @@ namespace YAML
const
char
*
const
EXPECTED_VALUE_TOKEN
=
"expected value token"
;
const
char
*
const
UNEXPECTED_KEY_TOKEN
=
"unexpected key token"
;
const
char
*
const
UNEXPECTED_VALUE_TOKEN
=
"unexpected value token"
;
template
<
typename
T
>
inline
const
std
::
string
KEY_NOT_FOUND_WITH_KEY
(
const
T
&
,
typename
disable_if
<
is_numeric
<
T
>
>::
type
*
=
0
)
{
return
KEY_NOT_FOUND
;
}
inline
const
std
::
string
KEY_NOT_FOUND_WITH_KEY
(
const
std
::
string
&
key
)
{
std
::
stringstream
stream
;
stream
<<
KEY_NOT_FOUND
<<
": "
<<
key
;
return
stream
.
str
();
}
template
<
typename
T
>
inline
const
std
::
string
KEY_NOT_FOUND_WITH_KEY
(
const
T
&
key
,
typename
enable_if
<
is_numeric
<
T
>
>::
type
*
=
0
)
{
std
::
stringstream
stream
;
stream
<<
KEY_NOT_FOUND
<<
": "
<<
key
;
return
stream
.
str
();
}
}
class
Exception
:
public
std
::
runtime_error
{
...
...
@@ -113,47 +91,6 @@ namespace YAML
:
Exception
(
mark_
,
msg_
)
{}
};
class
RepresentationException
:
public
Exception
{
public:
RepresentationException
(
const
Mark
&
mark_
,
const
std
::
string
&
msg_
)
:
Exception
(
mark_
,
msg_
)
{}
};
// representation exceptions
class
InvalidScalar
:
public
RepresentationException
{
public:
InvalidScalar
(
const
Mark
&
mark_
)
:
RepresentationException
(
mark_
,
ErrorMsg
::
INVALID_SCALAR
)
{}
};
class
KeyNotFound
:
public
RepresentationException
{
public:
template
<
typename
T
>
KeyNotFound
(
const
Mark
&
mark_
,
const
T
&
key_
)
:
RepresentationException
(
mark_
,
ErrorMsg
::
KEY_NOT_FOUND_WITH_KEY
(
key_
))
{}
};
template
<
typename
T
>
class
TypedKeyNotFound
:
public
KeyNotFound
{
public:
TypedKeyNotFound
(
const
Mark
&
mark_
,
const
T
&
key_
)
:
KeyNotFound
(
mark_
,
key_
),
key
(
key_
)
{}
virtual
~
TypedKeyNotFound
()
throw
()
{}
T
key
;
};
template
<
typename
T
>
inline
TypedKeyNotFound
<
T
>
MakeTypedKeyNotFound
(
const
Mark
&
mark
,
const
T
&
key
)
{
return
TypedKeyNotFound
<
T
>
(
mark
,
key
);
}
class
BadDereference
:
public
RepresentationException
{
public:
BadDereference
()
:
RepresentationException
(
Mark
::
null
(),
ErrorMsg
::
BAD_DEREFERENCE
)
{}
};
class
EmitterException
:
public
Exception
{
public:
EmitterException
(
const
std
::
string
&
msg_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment