[SwiftToCxx] Trowing Swift::Error instead of NaiveException

This commit is contained in:
Roberto Rosmaninho
2022-08-30 16:25:17 -03:00
parent ec10c5f5e6
commit 9ebc0bd26e
4 changed files with 11 additions and 10 deletions

View File

@@ -21,18 +21,18 @@ int main() {
try {
Functions::emptyThrowFunction();
} catch (swift::_impl::NaiveException& e) {
printf("%s\n", e.getMessage());
} catch (swift::_impl::swift::Error& e) {
printf("Exception\n");
}
try {
Functions::throwFunction();
} catch (swift::_impl::NaiveException& e) {
printf("%s\n", e.getMessage());
} catch (swift::_impl::swift::Error& e) {
printf("Exception\n");
}
try {
Functions::throwFunctionWithReturn();
} catch (swift::_impl::NaiveException& e) {
printf("%s\n", e.getMessage());
} catch (swift::_impl::swift::Error& e) {
printf("Exception\n");
}
return 0;