Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
d1b579f0
Commit
d1b579f0
authored
Jul 29, 2012
by
Davis King
Browse files
Added try/catch block to main().
parent
8c8c5bf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
74 deletions
+82
-74
examples/graph_labeling_ex.cpp
examples/graph_labeling_ex.cpp
+82
-74
No files found.
examples/graph_labeling_ex.cpp
View file @
d1b579f0
...
...
@@ -170,6 +170,8 @@ void make_training_examples(
int
main
()
{
try
{
// Get the training samples we defined above.
dlib
::
array
<
graph_type
>
samples
;
std
::
vector
<
std
::
vector
<
bool
>
>
labels
;
...
...
@@ -244,5 +246,11 @@ int main()
temp
=
labeler
(
g
);
for
(
unsigned
long
i
=
0
;
i
<
temp
.
size
();
++
i
)
cout
<<
" "
<<
i
<<
": "
<<
temp
[
i
]
<<
endl
;
}
catch
(
std
::
exception
&
e
)
{
cout
<<
"Error, an exception was thrown!"
<<
endl
;
cout
<<
e
.
what
()
<<
endl
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment