fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. try {
  6. true ? throw 1 : throw 2;
  7. } catch(int i) {
  8. cout << "throw : " << i << endl;
  9. }
  10. }
Success #stdin #stdout 0.01s 2856KB
stdin
Standard input is empty
stdout
throw : 1