Skip to content

Commit 4369393

Browse files
author
Peter Andreas Entschev
committed
Changed exception handling in examples to stderr.
1 parent d41b683 commit 4369393

13 files changed

Lines changed: 13 additions & 13 deletions

File tree

examples/computer_vision/fast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ int main(int argc, char** argv)
7373
fast_demo(console);
7474

7575
} catch (af::exception& ae) {
76-
std::cout << ae.what() << std::endl;
76+
std::cerr << ae.what() << std::endl;
7777
throw;
7878
}
7979

examples/computer_vision/harris.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ int main(int argc, char** argv)
129129
harris_demo(console);
130130

131131
} catch (af::exception& ae) {
132-
std::cout << ae.what() << std::endl;
132+
std::cerr << ae.what() << std::endl;
133133
throw;
134134
}
135135

examples/financial/monte_carlo_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int main()
7777
1000 * monte_carlo_bench<float, true>(n));
7878
}
7979
} catch (af::exception &ae) {
80-
std::cout << ae.what() << std::endl;
80+
std::cerr << ae.what() << std::endl;
8181
}
8282

8383
return 0;

examples/machine_learning/bagging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int main(int argc, char** argv)
144144
bagging_demo(console, perc);
145145

146146
} catch (af::exception &ae) {
147-
std::cout << ae.what() << std::endl;
147+
std::cerr << ae.what() << std::endl;
148148
}
149149

150150
}

examples/machine_learning/deep_belief_net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ int main(int argc, char** argv)
371371
return dbn_demo(console, perc);
372372

373373
} catch (af::exception &ae) {
374-
std::cout << ae.what() << std::endl;
374+
std::cerr << ae.what() << std::endl;
375375
}
376376

377377
}

examples/machine_learning/kmeans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ int main(int argc, char** argv)
173173
return kmeans_demo(k, console);
174174

175175
} catch (af::exception &ae) {
176-
std::cout << ae.what() << std::endl;
176+
std::cerr << ae.what() << std::endl;
177177
}
178178
}

examples/machine_learning/knn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int main(int argc, char** argv)
110110
knn_demo(console, perc);
111111

112112
} catch (af::exception &ae) {
113-
std::cout << ae.what() << std::endl;
113+
std::cerr << ae.what() << std::endl;
114114
}
115115

116116
}

examples/machine_learning/logistic_regression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ int main(int argc, char** argv)
200200
return logit_demo(console, perc);
201201

202202
} catch (af::exception &ae) {
203-
std::cout << ae.what() << std::endl;
203+
std::cerr << ae.what() << std::endl;
204204
}
205205

206206
}

examples/machine_learning/naive_bayes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int main(int argc, char** argv)
160160
naive_bayes_demo(console, perc);
161161

162162
} catch (af::exception &ae) {
163-
std::cout << ae.what() << std::endl;
163+
std::cerr << ae.what() << std::endl;
164164
}
165165

166166
}

examples/machine_learning/neural_network.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ int main(int argc, char** argv)
281281
return ann_demo(console, perc);
282282

283283
} catch (af::exception &ae) {
284-
std::cout << ae.what() << std::endl;
284+
std::cerr << ae.what() << std::endl;
285285
}
286286

287287
}

0 commit comments

Comments
 (0)