2010-04-06 19:32:14 +00:00
|
|
|
#include <iostream>
|
2010-05-26 19:38:11 +00:00
|
|
|
#include "Sleep.h"
|
2010-04-06 19:32:14 +00:00
|
|
|
int g_i = 0;
|
|
|
|
int main() {
|
|
|
|
for (; g_i < 8; g_i++) {
|
|
|
|
try {
|
|
|
|
std::cout << "Throwing exception" << std::endl;
|
|
|
|
throw 1;
|
|
|
|
}
|
|
|
|
catch (int exc) {
|
|
|
|
std::cout << "Exception caught" << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// For setting a catchpoint while target is running
|
|
|
|
std::cout << "Sleeping..." << std::endl;
|
2010-05-26 19:38:11 +00:00
|
|
|
SLEEP(2);
|
2010-04-06 19:32:14 +00:00
|
|
|
std::cout << "...awake!" << std::endl;
|
|
|
|
try {
|
|
|
|
std::cout << "Throwing exception" << std::endl;
|
|
|
|
throw 1;
|
|
|
|
}
|
|
|
|
catch (int exc) {
|
|
|
|
std::cout << "Exception caught" << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|