Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
ProMod3
Commits
da39416d
Commit
da39416d
authored
7 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-2893
: graceful exception handling for invalid fragdb queries
parent
3ccbaeec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loop/src/frag_db.cc
+11
-4
11 additions, 4 deletions
loop/src/frag_db.cc
with
11 additions
and
4 deletions
loop/src/frag_db.cc
+
11
−
4
View file @
da39416d
...
@@ -289,10 +289,17 @@ void FragDB::SearchDB(const StemCoordPair& stems,
...
@@ -289,10 +289,17 @@ void FragDB::SearchDB(const StemCoordPair& stems,
std
::
vector
<
FragmentInfo
>&
fragments
,
std
::
vector
<
FragmentInfo
>&
fragments
,
uint
extra_bins
)
{
uint
extra_bins
)
{
std
::
vector
<
StemPairGeom
>
stem_pairs
=
MakeStemPairGeom
(
stems
.
first
,
std
::
vector
<
StemPairGeom
>
stem_pairs
;
stems
.
second
,
try
{
frag_size
,
stem_pairs
=
MakeStemPairGeom
(
stems
.
first
,
stems
.
second
,
frag_size
,
extra_bins
);
extra_bins
);
}
catch
(
const
promod3
::
Error
&
)
{
// MakeStemPairGeom can fail if distance bin is out of bounds
// -> this is ok here as it simply means that we have no fitting fragments
// in this FragDB
// => silently ignore and keep fragments vector unchanged
return
;
}
for
(
std
::
vector
<
StemPairGeom
>::
iterator
it
=
stem_pairs
.
begin
();
for
(
std
::
vector
<
StemPairGeom
>::
iterator
it
=
stem_pairs
.
begin
();
it
!=
stem_pairs
.
end
();
++
it
){
it
!=
stem_pairs
.
end
();
++
it
){
...
...
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