blob: 815d15399ecb340195461c530860e43fc7048de3 (
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++!";
}
}
|