Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
361b9012
Commit
361b9012
authored
Mar 19, 2014
by
Eric Cano
Browse files
Comments improvement.
Added explaination for a bare dynamic cast to reference, which is not to straightforward.
parent
b69ef992
Changes
1
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/ClientProxy.cpp
View file @
361b9012
...
...
@@ -164,6 +164,13 @@ throw (castor::tape::Exception) {
// We could use the castor typing here, but we stick to case for homogeneity
// of the code.
try
{
// Here we are only interested by the fact that we received a
// notificationAcknowledge. The matching of the transactionId has already
// been checked automatically by requestResponseSession.
// The dynamic cast to reference will conveniently throw an exception
// it we did not get the acknowledgement. We cast it to void to silence
// some compilers (at least clang) which complain that the return value
// of the cast is not used.
(
void
)
dynamic_cast
<
tapegateway
::
NotificationAcknowledge
&>
(
*
ack
.
get
());
}
catch
(
std
::
bad_cast
)
{
throw
UnexpectedResponse
(
ack
.
get
(),
...
...
@@ -189,6 +196,13 @@ throw (castor::tape::Exception) {
// We could use the castor typing here, but we stick to case for homogeneity
// of the code.
try
{
// Here we are only interested by the fact that we received a
// notificationAcknowledge. The matching of the transactionId has already
// been checked automatically by requestResponseSession.
// The dynamic cast to reference will conveniently throw an exception
// it we did not get the acknowledgement. We cast it to void to silence
// some compilers (at least clang) which complain that the return value
// of the cast is not used.
(
void
)
dynamic_cast
<
tapegateway
::
NotificationAcknowledge
&>
(
*
ack
.
get
());
}
catch
(
std
::
bad_cast
)
{
throw
UnexpectedResponse
(
ack
.
get
(),
...
...
Write
Preview
Supports
Markdown
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