blob: 682a96f2527914c352e726a3ff3e9b3288c385c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright (C) 2015, Luke Iannini
#include <iostream>
#include <exception>
#include <string.h>
// Make sure can call unmangled names from Haskell's FFI
extern "C" {
int talkToCxx() {
try {
throw 20;
}
catch (int e) {
std::cout << "An exception occurred. Exception Nr. " << e << '\n';
}
std::cout << "Hello From C++!";
}
}
|