Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
c8a539f4
Commit
c8a539f4
authored
May 19, 2012
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old api exceptions
parent
683c60f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
63 deletions
+0
-63
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