Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Apd Toolbox
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jan Reher
Apd Toolbox
Commits
9e8fa623
Commit
9e8fa623
authored
4 years ago
by
Jan Reher
Browse files
Options
Downloads
Patches
Plain Diff
Added exception handling to process further APDs if one step fails.
parent
e9d93e9a
No related branches found
Branches containing commit
No related tags found
Loading
Pipeline
#1601
failed with stages
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apdUnitCreator.cpp
+10
-3
10 additions, 3 deletions
apdUnitCreator.cpp
with
10 additions
and
3 deletions
apdUnitCreator.cpp
+
10
−
3
View file @
9e8fa623
...
...
@@ -48,9 +48,16 @@ int main(int argc, char* argv[]) {
if
(
debug
)
cout
<<
"Connection successful!"
<<
endl
;
for
(
auto
newUnit
=
newUnits
.
begin
();
newUnit
<
newUnits
.
end
();
newUnit
++
)
{
proddb
->
createApdCapsule
(
newUnit
->
redSerial
,
newUnit
->
blueSerial
);
std
::
string
capsuleSerial
=
newUnit
->
blueSerial
+
"/"
+
newUnit
->
redSerial
;
proddb
->
createApdUnit
(
capsuleSerial
,
newUnit
->
crystalSerial
,
newUnit
->
barCode
);
try
{
proddb
->
createApdCapsule
(
newUnit
->
redSerial
,
newUnit
->
blueSerial
);
std
::
string
capsuleSerial
=
newUnit
->
blueSerial
+
"/"
+
newUnit
->
redSerial
;
proddb
->
createApdUnit
(
capsuleSerial
,
newUnit
->
crystalSerial
,
newUnit
->
barCode
);
}
catch
(
exception
e
)
{
std
::
cerr
<<
"An error occurred on APD paid with red APD "
<<
newUnit
->
redSerial
<<
" and blue APD "
<<
newUnit
->
blueSerial
<<
"!"
<<
std
::
endl
;
std
::
cerr
<<
e
.
what
();
continue
;
}
}
cout
<<
"Created "
<<
newUnits
.
size
()
<<
" APD Capsules and assigned them to Units."
;
...
...
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