mirror of https://github.com/davisking/dlib.git
Added try/catch block to main().
This commit is contained in:
parent
8c8c5bf3ce
commit
d1b579f09e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue