mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SwiftToCxx] Trowing Swift::Error instead of NaiveException
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user