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
3341e461
Commit
3341e461
authored
4 years ago
by
Jan Reher
Browse files
Options
Downloads
Patches
Plain Diff
Cleaner error handling? Maybe?
parent
9e8fa623
No related branches found
Branches containing commit
No related tags found
2 merge requests
!4
Many proven updates being brought into stable branch.
,
!3
Commented in the lines in apdUnitCreator.cpp that do the actual database
Pipeline
#1603
failed with stages
in 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apdUnitCreator.cpp
+7
-3
7 additions, 3 deletions
apdUnitCreator.cpp
with
7 additions
and
3 deletions
apdUnitCreator.cpp
+
7
−
3
View file @
3341e461
...
...
@@ -47,20 +47,24 @@ int main(int argc, char* argv[]) {
}
if
(
debug
)
cout
<<
"Connection successful!"
<<
endl
;
int
nFailed
=
0
;
for
(
auto
newUnit
=
newUnits
.
begin
();
newUnit
<
newUnits
.
end
();
newUnit
++
)
{
try
{
proddb
->
createApdCapsule
(
newUnit
->
redSerial
,
newUnit
->
blueSerial
);
std
::
string
capsuleSerial
=
newUnit
->
blueSerial
+
"/"
+
newUnit
->
redSerial
;
proddb
->
createApdUnit
(
capsuleSerial
,
newUnit
->
crystalSerial
,
newUnit
->
barCode
);
}
catch
(
exception
e
)
{
catch
(
std
::
exception
e
)
{
nFailed
++
;
std
::
cerr
<<
"An error occurred on APD paid with red APD "
<<
newUnit
->
redSerial
<<
" and blue APD "
<<
newUnit
->
blueSerial
<<
"!"
<<
std
::
endl
;
std
::
cerr
<<
e
.
what
();
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
<<
std
::
endl
;
continue
;
}
}
cout
<<
"Created "
<<
newUnits
.
size
()
<<
" APD Capsules and assigned them to Units."
;
cout
<<
"Created "
<<
newUnits
.
size
()
<<
" APD Capsules and assigned them to Units."
<<
std
::
endl
;
if
(
nFailed
>
0
)
cerr
<<
"Data entry failed for "
<<
nFailed
<<
" entries!"
<<
std
::
endl
;
return
(
-
newUnits
.
empty
());
}
...
...
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