Check for error codes returned from application::create() and version::create()

This commit is contained in:
Chris Morgan
2007-08-04 04:50:14 +00:00
committed by WineHQ
parent 2a46ab1b2a
commit 0290064883

View File

@@ -13,11 +13,18 @@ function create_version_and_parent_app($sId = "")
{ {
$oApp = new application(); $oApp = new application();
$oApp->sName = "OM App ".$sId; $oApp->sName = "OM App ".$sId;
$oApp->create(); if(!$oApp->create())
{
error("oApp->create() failed\n");
}
$oVersion = new version(); $oVersion = new version();
$oVersion->sName = "OM version ".$sId; $oVersion->sName = "OM version ".$sId;
$oVersion->iAppId = $oApp->iAppId; $oVersion->iAppId = $oApp->iAppId;
$oVersion->create(); if(!$oVersion->create())
{
error("oVersion->create() failed");
}
return $oVersion->iVersionId; return $oVersion->iVersionId;
} }