function testGetNiceTraceAsString_HideCalls() { $full = new lmbException('foo', array(), 0); $with_hidden_call = new lmbException('foo', array(), 0, 1); $trace_full = explode(PHP_EOL, $full->getNiceTraceAsString()); $trace_with_hidden_call = explode(PHP_EOL, $with_hidden_call->getNiceTraceAsString()); $this->assertEqual($trace_full[1], $trace_with_hidden_call[0]); }
/** * Constructor * @param string Exception message * @param lmbErrorList List of validation errors * @param array List of extra exception params * @param int Exception code */ function __construct($message, $error_list, $params = array(), $code = 0) { $this->error_list = $error_list; $errors = array(); foreach ($this->error_list as $error) { $errors[] = $error->getReadable(); } $message .= ' Errors list : ' . implode(', ', $errors); parent::__construct($message, $params, $code); }
function __construct($lib_name) { parent::__construct('Library not installed', array('file' => $lib_name)); }
function __construct($type = '') { parent::__construct('Image type is not supported', $type ? array('type' => $type) : array()); }
function __construct($message, $params = array()) { parent::__construct('MACRO exception: ' . $message, $params); }
function __construct($file_name) { parent::__construct('Image create is failed', array('file' => $file_name)); }