Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
f77ed1ab
Commit
f77ed1ab
authored
Dec 10, 2012
by
Michal 'vorner' Vaner
Browse files
[2377] Make the construction exception safe
parent
9e8813ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/master_loader.cc
View file @
f77ed1ab
...
...
@@ -21,8 +21,10 @@
#include
<dns/rdata.h>
#include
<string>
#include
<memory>
using
std
::
string
;
using
std
::
auto_ptr
;
namespace
isc
{
namespace
dns
{
...
...
@@ -236,9 +238,12 @@ MasterLoader::MasterLoader(std::istream& stream,
if
(
add_callback
.
empty
())
{
isc_throw
(
isc
::
InvalidParameter
,
"Empty add RR callback"
);
}
impl_
=
new
MasterLoaderImpl
(
""
,
zone_origin
,
zone_class
,
callbacks
,
add_callback
,
options
);
impl_
->
pushStreamSource
(
stream
);
auto_ptr
<
MasterLoaderImpl
>
impl
(
new
MasterLoaderImpl
(
""
,
zone_origin
,
zone_class
,
callbacks
,
add_callback
,
options
));
impl
->
pushStreamSource
(
stream
);
impl_
=
impl
.
release
();
}
MasterLoader
::~
MasterLoader
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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