crmFactory.RegisterDemoAccount
投げException
ます。変数を使用するには、変数res
を初期化する必要があります。
は初期化できないため、割り当てられていない変数の使用に関するコンパイル エラーを発生させずAccountRegistrationResponse
に宣言するにはどうすればよいですか? res
null に割り当てることはできますが、これは良いプログラミング アプローチではないと思います。
AccountRegistrationResponse res /*=null*/;
try
{
res = crmFactory.RegisterDemoAccount(CrmConfigRepository.CrmOwnerUserId
, CrmConfigRepository.CrmOrganizationName
, CrmConfigRepository.CrmBusinessUnitName
, demo.getData());
}
catch (Exception e)
{
_log.Error("Cannot create demo account", e);
}
_log.Debug(res.getString());