[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

@@ -695,7 +695,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxThunkBody(
// Create the condition and the statement to throw an exception.
if (hasThrows) {
os << " if (opaqueError != nullptr)\n";
os << " throw (swift::_impl::NaiveException(\"Exception\"));\n";
os << " throw (swift::_impl::swift::Error(opaqueError));\n";
}
// Return the function result value if it doesn't throw.