mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-28 06:34:14 +01:00
Customers portal : Improved error message on autocomplete field when the portal configuration is incorrect
SVN:trunk[4262]
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
|
||||
namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer;
|
||||
|
||||
use \Exception;
|
||||
use \CoreException;
|
||||
use \utils;
|
||||
use \IssueLog;
|
||||
use \Dict;
|
||||
use \UserRights;
|
||||
use \InlineImage;
|
||||
@@ -134,7 +137,15 @@ EOF
|
||||
// Retrieving field value
|
||||
if ($this->oField->GetCurrentValue() !== null && $this->oField->GetCurrentValue() !== 0)
|
||||
{
|
||||
$oFieldValue = MetaModel::GetObject($sFieldValueClass, $this->oField->GetCurrentValue());
|
||||
try
|
||||
{
|
||||
$oFieldValue = MetaModel::GetObject($sFieldValueClass, $this->oField->GetCurrentValue());
|
||||
}
|
||||
catch (CoreException $e)
|
||||
{
|
||||
IssueLog::Error('Could not retrieve object ' . $sFieldValueClass . '::' . $this->oField->GetCurrentValue() . ' for "' . $this->oField->GetId() . '" field.');
|
||||
throw new Exception($e->getMessage(), $e->getCode(), $e->getPrevious());
|
||||
}
|
||||
$sFieldValue = $oFieldValue->GetName();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user