diff --git a/clionenv.sh b/clionenv.sh new file mode 100644 index 000000000..bd5f2920d --- /dev/null +++ b/clionenv.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# FIXME: +export PREFIX="/Users/stepus53/projects/os2/toolchain/gcc-x86_64-os3-prefix/" +export TARGET=x86_64-os3 +export PATH="$PREFIX/bin:$PATH" + diff --git a/src/test/hello2.cpp b/src/test/hello2.cpp index a6e8fad6d..c17703fa5 100644 --- a/src/test/hello2.cpp +++ b/src/test/hello2.cpp @@ -1,5 +1,18 @@ #include +void badfn() { + throw std::runtime_error("oops"); +} + int main() { - std::cout << "Hi!" << std::endl; + std::cout << "hi" << std::endl; + try { + std::cout << "try" << std::endl; + badfn(); + std::cout << "ok" << std::endl; + } catch (std::exception &e) { + std::cout << "huh" << std::endl; + std::cout << e.what() << std::endl; + } + std::cout << "fin" << std::endl; } \ No newline at end of file