Added try/catch block to main().

This commit is contained in:
Davis King 2012-07-29 20:18:00 -04:00
parent 8c8c5bf3ce
commit d1b579f09e
1 changed files with 68 additions and 60 deletions

View File

@ -169,6 +169,8 @@ void make_training_examples(
// ----------------------------------------------------------------------------------------
int main()
{
try
{
// Get the training samples we defined above.
dlib::array<graph_type> samples;
@ -245,4 +247,10 @@ int main()
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;
}
}