Add some detail for a specific suspect case of not supported creation functions.
This commit is contained in:
parent
e8d164dcf5
commit
6fef0916b4
@ -6836,7 +6836,7 @@ std::pair<std::string, std::string> VulkanHppGenerator::constructRAIIHandleConst
|
|||||||
[&handle]( ParamData const & pd ) { return pd.type.type == handle.first; } );
|
[&handle]( ParamData const & pd ) { return pd.type.type == handle.first; } );
|
||||||
assert( handleParamIt != constructorIt->second.params.end() && handleParamIt->type.isNonConstPointer() );
|
assert( handleParamIt != constructorIt->second.params.end() && handleParamIt->type.isNonConstPointer() );
|
||||||
|
|
||||||
std::string singularConstructor, arrayConstructor;
|
std::string singularConstructor, arrayConstructor, throwDetail;
|
||||||
bool constructedConstructor = false;
|
bool constructedConstructor = false;
|
||||||
if ( handleParamIt->len.empty() )
|
if ( handleParamIt->len.empty() )
|
||||||
{
|
{
|
||||||
@ -6845,11 +6845,17 @@ std::pair<std::string, std::string> VulkanHppGenerator::constructRAIIHandleConst
|
|||||||
singularConstructor = constructRAIIHandleConstructorVoid( handle, constructorIt, enter, leave );
|
singularConstructor = constructRAIIHandleConstructorVoid( handle, constructorIt, enter, leave );
|
||||||
constructedConstructor = true;
|
constructedConstructor = true;
|
||||||
}
|
}
|
||||||
else if ( ( constructorIt->second.returnType == "VkResult" ) &&
|
else if ( ( constructorIt->second.returnType == "VkResult" ) && ( constructorIt->second.successCodes.size() == 1 ) )
|
||||||
( constructorIt->second.successCodes.size() == 1 ) && ( !constructorIt->second.errorCodes.empty() ) )
|
|
||||||
{
|
{
|
||||||
singularConstructor = constructRAIIHandleConstructorResult( handle, constructorIt, enter, leave );
|
if ( !constructorIt->second.errorCodes.empty() )
|
||||||
constructedConstructor = true;
|
{
|
||||||
|
singularConstructor = constructRAIIHandleConstructorResult( handle, constructorIt, enter, leave );
|
||||||
|
constructedConstructor = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throwDetail = "\n\tReason: no errorcodes provided.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -6880,7 +6886,8 @@ std::pair<std::string, std::string> VulkanHppGenerator::constructRAIIHandleConst
|
|||||||
}
|
}
|
||||||
if ( !constructedConstructor )
|
if ( !constructedConstructor )
|
||||||
{
|
{
|
||||||
throw std::runtime_error( "Never encountered a constructor function like " + constructorIt->first + " !" );
|
throw std::runtime_error( "Never encountered a constructor function like " + constructorIt->first + " !" +
|
||||||
|
throwDetail );
|
||||||
}
|
}
|
||||||
return std::make_pair( singularConstructor, arrayConstructor );
|
return std::make_pair( singularConstructor, arrayConstructor );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user