src/ets.php
function error($error_type, $errno, $message = '', $line = 0, $elt_type = _ETS_NULL)
	{
		switch ($error_type) {
			case 0: // WARNING - wrong element in another or at root
				if ($elt_type == _ETS_ROOT) {
					$this->check_level(E_WARNING, $errno, "$message can't be defined outside a template on line $line of <b>{$this->container}</b><br>");
				} else {
					$this->check_level(E_WARNING, $errno, $this->elt_label($elt_type) . " can't contain $message on line $line of <b>{$this->container}</b><br>");
				}
				break;
			case 1: // WARNING - unexpected closing tag
				$this->check_level(E_WARNING, $errno, 'unexpected closing tag {/' . $message . "} on line $line of <b>{$this->container}</b><br>");
				break;
			case 2: // WARNING - unexpected character or space in tag
				$this->check_level(E_WARNING, $errno, "$message on line $line of <b>{$this->container}</b><br>");
				break;
			case 3: // WARNING - end of comment or cdata not found
				$this->check_level(E_WARNING, $errno, "end of " . $this->mode_label($elt_type) . " starting on line $line not found in <b>{$this->container}</b><br>");
				break;
			case 4: // WARNING - closing tag not found
				$this->check_level(E_WARNING, $errno, "closing tag not found for " . $this->elt_label($elt_type) . " starting on line $line in <b>{$this->container}</b><br>");
				break;
			case 5: // NOTICE - container not found (include element with line number available)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in include element on line $line of <b>{$this->container}</b><br>");
				break;
			case 6: // NOTICE - duplicated use of reduce element (without line number available, with several containers)
				$this->check_level(E_NOTICE, $errno, "$message<br>");
				break;
			case 7: // NOTICE - duplicated use of reduce element, invalid value for reduce element
				$this->check_level(E_NOTICE, $errno, "$message on line $line of <b>{$this->container}</b><br>");
				break;
			case 8: // ERROR - entry mask not found
				$this->check_level(E_ERROR, $errno, "unable to find entry mask $message<br>");
				break;
			case 9: // NOTICE - invalid datatree
				$this->check_level(E_NOTICE, $errno, "datatree is not an array, an object or null<br>");
				break;
			case 10: // ERROR - invalid containers
				$this->check_level(E_ERROR, $errno, "containers are not an array or a string<br>");
				break;
			case 11: // NOTICE - container not found (argument)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message given as argument<br>");
				break;
			case 12: // NOTICE - container not found (insert element)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in insert element<br>");
				break;
			case 13: // NOTICE - container not found (include element without line number available)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in include element<br>");
				break;
			case 14: // NOTICE - container not found (eval element)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in eval element<br>");
				break;
			case 15: // NOTICE - wrong element in safe mode
				$this->check_level(E_NOTICE, $errno, $this->elt_label($elt_type) . " disabled for security reasons<br>");
				break;
			case 16: // WARNING - template already defined (without line number available, with several containers) / container already used
				$this->check_level(E_WARNING, $errno, "$message<br>");
				break;
		}
	}
function error($error_type, $errno, $message = '', $line = 0, $elt_type = _ETS_NULL)
	{
		switch ($error_type) {
			case 0: // WARNING - wrong element in another or at root
				if ($elt_type == _ETS_ROOT) {
					$this->check_level(E_WARNING, $errno, "$message can't be defined outside a template on line $line of <b>{$this->container}</b><br>");
				} else {
					$this->check_level(E_WARNING, $errno, $this->elt_label($elt_type) . " can't contain $message on line $line of <b>{$this->container}</b><br>");
				}
				break;
			case 1: // WARNING - unexpected closing tag
				$this->check_level(E_WARNING, $errno, 'unexpected closing tag {/' . $message . "} on line $line of <b>{$this->container}</b><br>");
				break;
			case 2: // WARNING - unexpected character or space in tag
				$this->check_level(E_WARNING, $errno, "$message on line $line of <b>{$this->container}</b><br>");
				break;
			case 3: // WARNING - end of comment or cdata not found
				$this->check_level(E_WARNING, $errno, "end of " . $this->mode_label($elt_type) . " starting on line $line not found in <b>{$this->container}</b><br>");
				break;
			case 4: // WARNING - closing tag not found
				$this->check_level(E_WARNING, $errno, "closing tag not found for " . $this->elt_label($elt_type) . " starting on line $line in <b>{$this->container}</b><br>");
				break;
			case 5: // NOTICE - container not found (include element with line number available)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in include element on line $line of <b>{$this->container}</b><br>");
				break;
			case 6: // NOTICE - duplicated use of reduce element (without line number available, with several containers)
				$this->check_level(E_NOTICE, $errno, "$message<br>");
				break;
			case 7: // NOTICE - duplicated use of reduce element, invalid value for reduce element
				$this->check_level(E_NOTICE, $errno, "$message on line $line of <b>{$this->container}</b><br>");
				break;
			case 8: // ERROR - entry mask not found
				$this->check_level(E_ERROR, $errno, "unable to find entry mask $message<br>");
				break;
			case 9: // NOTICE - invalid datatree
				$this->check_level(E_NOTICE, $errno, "datatree is not an array, an object or null<br>");
				break;
			case 10: // ERROR - invalid containers
				$this->check_level(E_ERROR, $errno, "containers are not an array or a string<br>");
				break;
			case 11: // NOTICE - container not found (argument)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message given as argument<br>");
				break;
			case 12: // NOTICE - container not found (insert element)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in insert element<br>");
				break;
			case 13: // NOTICE - container not found (include element without line number available)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in include element<br>");
				break;
			case 14: // NOTICE - container not found (eval element)
				$this->check_level(E_NOTICE, $errno, "unable to get the content of $message in eval element<br>");
				break;
			case 15: // NOTICE - wrong element in safe mode
				$this->check_level(E_NOTICE, $errno, $this->elt_label($elt_type) . " disabled for security reasons<br>");
				break;
			case 16: // WARNING - template already defined (without line number available, with several containers) / container already used
				$this->check_level(E_WARNING, $errno, "$message<br>");
				break;
		}
	}
Print out an error message