Commit d1b579f0 authored by Davis King's avatar Davis King

Added try/catch block to main().

parent 8c8c5bf3
...@@ -170,6 +170,8 @@ void make_training_examples( ...@@ -170,6 +170,8 @@ void make_training_examples(
int main() int main()
{ {
try
{
// Get the training samples we defined above. // Get the training samples we defined above.
dlib::array<graph_type> samples; dlib::array<graph_type> samples;
std::vector<std::vector<bool> > labels; std::vector<std::vector<bool> > labels;
...@@ -244,5 +246,11 @@ int main() ...@@ -244,5 +246,11 @@ int main()
temp = labeler(g); temp = labeler(g);
for (unsigned long i = 0; i < temp.size(); ++i) for (unsigned long i = 0; i < temp.size(); ++i)
cout << " " << i << ": " << temp[i] << endl; cout << " " << i << ": " << temp[i] << endl;
}
catch (std::exception& e)
{
cout << "Error, an exception was thrown!" << endl;
cout << e.what() << endl;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment