Advertisement
Guest User

Untitled

a guest
Dec 27th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. using exception := cpp("<exception>");
  2. type myexception {
  3. realexception : exception.std.exception_ptr;
  4. }
  5. f(func) {
  6. try {
  7. func();
  8. } catch(...) {
  9. throw myexception({ exception.std.current_exception() });
  10. }
  11. }
  12. Main() {
  13. func(() => x + 1);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement