Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AIControllerV2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
InputOutput
ADLINK
AIControllerV2
Commits
eb10299d
Commit
eb10299d
authored
Mar 23, 2016
by
Sonia Minolli
Browse files
Options
Downloads
Patches
Plain Diff
Change Nexus exception handling (TANGODEVIC-1473)
parent
81f378a4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/NexusManager.cpp
+32
-17
32 additions, 17 deletions
src/NexusManager.cpp
src/NexusManager.h
+11
-6
11 additions, 6 deletions
src/NexusManager.h
with
43 additions
and
23 deletions
src/NexusManager.cpp
+
32
−
17
View file @
eb10299d
...
...
@@ -55,12 +55,13 @@ NexusManager::~NexusManager ()
}
catch
(
nxcpp
::
NexusException
&
n
)
{
ERROR_STREAM
<<
"Nexus4TangoException caught ..."
<<
std
::
endl
;
n
.
dump
();
ERROR_STREAM
<<
"Nexus4TangoException caught: "
<<
n
.
to_string
()
<<
std
::
endl
;
}
catch
(...)
{
ERROR_STREAM
<<
"NexusManager::~NexusManager caught [...]
:
"
<<
std
::
endl
;
ERROR_STREAM
<<
"NexusManager::~NexusManager caught [...]
!
"
<<
std
::
endl
;
}
}
...
...
@@ -124,10 +125,14 @@ void NexusManager::initNexusAcquisition(std::string nexus_file_path,
}
catch
(
nxcpp
::
NexusException
&
n
)
{
ERROR_STREAM
<<
"NexusManager::initNexusAcquisition -> caught Nexus4TangoException."
<<
std
::
endl
;
this
->
manageNexusAbort
();
ERROR_STREAM
<<
"Nexus4TangoException caught ... see log."
<<
std
::
endl
;
n
.
dump
();
ERROR_STREAM
<<
"NexusManager::initNexusAcquisition -> caught Nexus4TangoException: "
<<
n
.
to_string
()
<<
std
::
endl
;
if
(
m_pAcqWriter
)
m_pAcqWriter
->
Abort
();
ERROR_STREAM
<<
"Nexus storage ABORTED."
<<
std
::
endl
;
Tango
::
DevFailed
df
=
this
->
nexusToTangoException
(
n
);
throw
df
;
}
...
...
@@ -199,8 +204,10 @@ void NexusManager::initNexusAcquisition(std::string nexus_file_path,
}
catch
(
nxcpp
::
NexusException
&
n4te
)
{
ERROR_STREAM
<<
"NexusManager::initNexusAcquisition -> caught NEXUS Exception : see logs"
<<
std
::
endl
;
n4te
.
dump
();
ERROR_STREAM
<<
"NexusManager::initNexusAcquisition -> caught NEXUS Exception: "
<<
n4te
.
to_string
()
<<
std
::
endl
;
Tango
::
DevFailed
df
=
this
->
nexusToTangoException
(
n4te
);
throw
df
;
}
...
...
@@ -267,25 +274,33 @@ void NexusManager::finalizeNexusGeneration()
}
catch
(
nxcpp
::
NexusException
&
n
)
{
ERROR_STREAM
<<
"NexusManager::finalizeNxGeneration -> Nexus4TangoException caught."
<<
std
::
endl
;
n
.
dump
();
this
->
manageNexusAbort
();
ERROR_STREAM
<<
"NexusManager::finalizeNxGeneration -> Nexus4TangoException caught: "
<<
n
.
to_string
()
<<
std
::
endl
;
if
(
m_pAcqWriter
)
m_pAcqWriter
->
Abort
();
ERROR_STREAM
<<
"Nexus storage ABORTED."
<<
std
::
endl
;
Tango
::
DevFailed
df
=
this
->
nexusToTangoException
(
n
);
throw
df
;
}
catch
(
yat
::
Exception
&
n
)
{
ERROR_STREAM
<<
"NexusManager::finalizeNxGeneration -> yat::Exception caught."
<<
std
::
endl
;
n
.
dump
();
ERROR_STREAM
<<
"NexusManager::finalizeNxGeneration -> yat::Exception caught: "
<<
n
.
to_string
()
<<
std
::
endl
;
if
(
m_pAcqWriter
)
m_pAcqWriter
->
Abort
();
ERROR_STREAM
<<
"Nexus storage ABORTED."
<<
std
::
endl
;
this
->
manageNexusAbort
();
}
catch
(...)
{
ERROR_STREAM
<<
"NexusManager::finalizeNxGeneration -> caught [...] Exception"
<<
std
::
endl
;
ERROR_STREAM
<<
"Nexus stotage ABORTED."
<<
std
::
endl
;
this
->
manageNexusAbort
();
ERROR_STREAM
<<
"Nexus stotage ABORTED."
<<
std
::
endl
;
THROW_DEVFAILED
(
_CPTC
(
"DEVICE_ERROR"
),
_CPTC
(
"Failed to finilize Nexus storage (caught [...])!"
),
_CPTC
(
"NexusManager::finalizeNxGeneration"
));
...
...
This diff is collapsed.
Click to expand it.
src/NexusManager.h
+
11
−
6
View file @
eb10299d
...
...
@@ -152,10 +152,14 @@ public:
}
catch
(
nxcpp
::
NexusException
&
n
)
{
ERROR_STREAM
<<
"NexusManager::pushNexusData -> caught NEXUS Exception"
<<
std
::
endl
;
n
.
dump
();
ERROR_STREAM
<<
"NexusManager::pushNexusData -> caught NEXUS Exception:"
<<
n
.
to_string
()
<<
std
::
endl
;
this
->
m_storageError
=
true
;
this
->
manageNexusAbort
();
if
(
m_pAcqWriter
)
m_pAcqWriter
->
Abort
();
Tango
::
DevFailed
df
=
this
->
nexusToTangoException
(
n
);
throw
df
;
}
...
...
@@ -205,9 +209,10 @@ public:
// from nxcpp::IExceptionHandler
void
OnNexusException
(
const
nxcpp
::
NexusException
&
e
)
{
ERROR_STREAM
<<
"NexusManager::OnNexusException -> caught NEXUS Exception"
<<
std
::
endl
;
e
.
dump
();
this
->
manageNexusAbort
();
ERROR_STREAM
<<
"NexusManager::OnNexusException -> caught NEXUS Exception:"
<<
e
.
to_string
()
<<
std
::
endl
;
this
->
m_pAcqWriter
->
Abort
();
this
->
m_storageError
=
true
;
}
...
...
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