Improve error handling

This commit is contained in:
Georg Hagen
2025-01-08 15:50:10 +01:00
parent 2a1157ef71
commit 7d69fd3ca9
2 changed files with 6 additions and 2 deletions

View File

@@ -19,10 +19,14 @@ namespace OpenVulkano::AR::ArKit
}
}
std::shared_ptr<ArSession> ArSessionArKit::Create(const ArSessionConfig& config)
std::shared_ptr<ArSession> ArSessionArKit::Create(const ArSessionConfig& config) try
{
return std::dynamic_pointer_cast<ArSession>(std::make_shared<ArSessionArKitInternal>(config));
}
catch (NSException* e)
{
throw std::runtime_error(e.description.cString);
}
bool ArSessionArKit::IsAvailable()
{