Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
2f2f6509
Commit
2f2f6509
authored
10 years ago
by
David COME
Browse files
Options
Downloads
Patches
Plain Diff
Added a bunch of missing comments in MemBlock.hpp
parent
d6881d28
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/tape/tapeserver/daemon/MemBlock.hpp
+23
-0
23 additions, 0 deletions
castor/tape/tapeserver/daemon/MemBlock.hpp
with
23 additions
and
0 deletions
castor/tape/tapeserver/daemon/MemBlock.hpp
+
23
−
0
View file @
2f2f6509
...
...
@@ -59,6 +59,9 @@ class MemBlock {
*/
std
::
string
m_errorMsg
;
/**
* in case of error, the error message
*/
int
m_errorCode
;
AlterationContext
(
const
std
::
string
&
msg
,
int
errorCode
,
Failed_t
)
:
...
...
@@ -80,6 +83,11 @@ public:
reset
();
}
/**
* Get the error message from the context,
* Throw an exception if there is no context
* @return
*/
std
::
string
errorMsg
()
const
{
if
(
m_context
.
get
())
{
return
m_context
->
m_errorMsg
;
...
...
@@ -88,6 +96,12 @@ public:
throw
castor
::
exception
::
Exception
(
"Error Context is not set ="
" no error message to give"
);
}
/**
* Get the error code from the context,
* Throw an exception if there is no context
* @return
*/
int
errorCode
()
const
{
if
(
m_context
.
get
())
{
return
m_context
->
m_errorCode
;
...
...
@@ -96,10 +110,19 @@ public:
throw
castor
::
exception
::
Exception
(
"Error Context is not set ="
" no error code to give"
);
}
/**
* Return true if the block has been marked as failed
* @return
*/
bool
isFailed
()
const
{
return
m_context
.
get
()
&&
m_context
->
m_failed
;
}
/**
* Return true if the block has been marked as canceled
* @return
*/
bool
isCanceled
()
const
{
return
m_context
.
get
()
&&
m_context
->
m_cancelled
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment