<?php

namespace Modules\RemoteData\EntityManagementWs\Model;

/**
 * The general response object which is used when serving entity management webservice calls.
 * @author Gabi
 */
#[\AllowDynamicProperties]
class Response extends \App\Utils\Webservice\Rest\ResponseAbstract
{

	/**
	 * The current entity id.
	 * @var Int
	 */
	public $idEntity = 0;

	public function applyRuntimeException(\Exception $e)
	{
		$this->status = 'error';
		$this->message = $e->getMessage();
		if ($e instanceof \Modules\RemoteData\EntityManagementWs\Model\RuntimeException) {
			$this->errorCode = $e->getMessageCode();
		}
	}

}

