Commit f5f54b54 authored by Alex Ne's avatar Alex Ne

Этот обработчик не позволит разбивать однотипные ошибки изза разных параметров функций

parent 6b1bfd30
...@@ -5,7 +5,6 @@ namespace X\ETrace; ...@@ -5,7 +5,6 @@ namespace X\ETrace;
* *
*/ */
class EItem extends \Exception { class EItem extends \Exception {
/** /**
* @var mixed * @var mixed
*/ */
...@@ -112,7 +111,7 @@ class EItem extends \Exception { ...@@ -112,7 +111,7 @@ class EItem extends \Exception {
"trace" => $this->Trace(), "trace" => $this->Trace(),
"message" => $this->message, "message" => $this->message,
"context" => $this->context, "context" => $this->context,
"object_name" => $this->object_name, "object_name" => $this->object_name
]; ];
} }
...@@ -143,6 +142,13 @@ class EItem extends \Exception { ...@@ -143,6 +142,13 @@ class EItem extends \Exception {
* @return mixed * @return mixed
*/ */
private function calcHash() { private function calcHash() {
$re_trace = array_map(function ($item) {
if (isset($item["file"])) {
return [$item["file"], $item["line"]];
} else {
return ["nofile", "noline"];
}
}, $this->Trace());
return md5(serialize([ return md5(serialize([
$this->object_name, $this->object_name,
$this->host, $this->host,
...@@ -151,7 +157,7 @@ class EItem extends \Exception { ...@@ -151,7 +157,7 @@ class EItem extends \Exception {
$this->code, $this->code,
$this->file, $this->file,
$this->line, $this->line,
$this->Trace()])); $re_trace]));
} }
} }
?> ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment