mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-18 16:18:47 +02:00
DOMFormatException : Overloaded the constructor to add an optionnal parameter $node (\DOMNode) that will append informations about the node and the exception line number to $message.
SVN:trunk[3842]
This commit is contained in:
@@ -18,11 +18,28 @@
|
||||
|
||||
|
||||
require_once(APPROOT.'setup/setuputils.class.inc.php');
|
||||
require_once(APPROOT.'setup/modelfactory.class.inc.php');
|
||||
require_once(APPROOT.'core/moduledesign.class.inc.php');
|
||||
|
||||
|
||||
class DOMFormatException extends Exception
|
||||
{
|
||||
/**
|
||||
* Overrides the Exception default constructor to automatically add informations about the concerned node (path and line number)
|
||||
*
|
||||
* @param string $message
|
||||
* @param type $code
|
||||
* @param type $previous
|
||||
* @param DOMNode $node [Optionnal] DOMNode causing the DOMFormatException
|
||||
*/
|
||||
public function __construct($message, $code, $previous, DOMNode $node = null)
|
||||
{
|
||||
if($node !== null)
|
||||
{
|
||||
$message .= ' ('.MFDocument::GetItopNodePath($node).' at line '.$node->getLineNo().')';
|
||||
}
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user