Improve error handling
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user