改名
This commit is contained in:
@@ -407,7 +407,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
$lastId = $this->refresh();
|
$lastId = $this->refresh();
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$trance->rollback();
|
$trance->rollback();
|
||||||
$lastId = $this->addError($exception->getMessage(), 'mysql');
|
$lastId = $this->addError($exception, 'mysql');
|
||||||
}
|
}
|
||||||
return $lastId;
|
return $lastId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ class Pagination extends Component
|
|||||||
try {
|
try {
|
||||||
call_user_func($callback, $data, $param);
|
call_user_func($callback, $data, $param);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception->getMessage());
|
$this->addError($exception);
|
||||||
} finally {
|
} finally {
|
||||||
$event = Snowflake::app()->getEvent();
|
$event = Snowflake::app()->getEvent();
|
||||||
$event->trigger(Event::SYSTEM_RESOURCE_RELEASES);
|
$event->trigger(Event::SYSTEM_RESOURCE_RELEASES);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ abstract class Callback extends Application
|
|||||||
$event->offName(Event::SYSTEM_RESOURCE_RELEASES);
|
$event->offName(Event::SYSTEM_RESOURCE_RELEASES);
|
||||||
$this->eventNotify($message, $event);
|
$this->eventNotify($message, $event);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->error($exception->getMessage());
|
$this->addError($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ abstract class Callback extends Application
|
|||||||
$mail->AltBody = $message;
|
$mail->AltBody = $message;
|
||||||
$mail->send();
|
$mail->send();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->addError($e->getMessage(), 'email');
|
$this->addError($e, 'email');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class OnHandshake extends Callback
|
|||||||
}
|
}
|
||||||
return $node->dispatch($request, $response);
|
return $node->dispatch($request, $response);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception->getMessage() . ' ' . $exception->getFile() . ' ' . $exception->getLine());
|
$this->addError($exception);
|
||||||
return $this->disconnect($response, 500);
|
return $this->disconnect($response, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class OnMessage extends Callback
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception->getMessage(), 'websocket');
|
$this->addError($exception, 'websocket');
|
||||||
$server->send($frame->fd, $exception->getMessage());
|
$server->send($frame->fd, $exception->getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
fire(Event::SYSTEM_RESOURCE_RELEASES);
|
fire(Event::SYSTEM_RESOURCE_RELEASES);
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ class Node extends Application
|
|||||||
return [$reflect->newInstance(), $action];
|
return [$reflect->newInstance(), $action];
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
$this->_error = $exception->getMessage();
|
$this->_error = $exception->getMessage();
|
||||||
$this->error($exception->getMessage(), 'router');
|
$this->error($exception, 'router');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ class Router extends Application implements RouterInterface
|
|||||||
$router = $this;
|
$router = $this;
|
||||||
include_once "{$files}";
|
include_once "{$files}";
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception);
|
||||||
} finally {
|
} finally {
|
||||||
if (isset($exception)) {
|
if (isset($exception)) {
|
||||||
unset($exception);
|
unset($exception);
|
||||||
|
|||||||
+4
-4
@@ -69,7 +69,7 @@ class Kafka extends \Snowflake\Process\Process
|
|||||||
$this->resolve($topic, $conf['interval'] ?? 1000);
|
$this->resolve($topic, $conf['interval'] ?? 1000);
|
||||||
} while (true);
|
} while (true);
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
$this->application->error($exception->getMessage());
|
$this->application->error($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ class Kafka extends \Snowflake\Process\Process
|
|||||||
$this->application->error($message->errstr());
|
$this->application->error($message->errstr());
|
||||||
}
|
}
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
$this->application->error($exception->getMessage());
|
$this->application->error($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ class Kafka extends \Snowflake\Process\Process
|
|||||||
}
|
}
|
||||||
$class->onHandler(new Struct($topic, $message));
|
$class->onHandler(new Struct($topic, $message));
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
$this->application->error($exception->getMessage());
|
$this->application->error($exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@ class Kafka extends \Snowflake\Process\Process
|
|||||||
|
|
||||||
return [$conf, $topicConf, $kafka];
|
return [$conf, $topicConf, $kafka];
|
||||||
} catch (Throwable $exception) {
|
} catch (Throwable $exception) {
|
||||||
$this->application->error($exception->getMessage());
|
$this->application->error($exception);
|
||||||
|
|
||||||
return [null, null, null];
|
return [null, null, null];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
|
|
||||||
$data = Json::to($code, $this->category . ': ' . $message, $path);
|
$data = Json::to($code, $this->category . ': ' . $message, $path);
|
||||||
|
|
||||||
Snowflake::app()->trance($data, $this->category);
|
logger()->trance($data, $this->category);
|
||||||
|
|
||||||
return response()->send($data);
|
return response()->send($data);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -217,7 +217,7 @@ class Event extends BaseObject
|
|||||||
}
|
}
|
||||||
call_user_func($handler, ...$defaultParameter);
|
call_user_func($handler, ...$defaultParameter);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($is_remove) {
|
if ($is_remove) {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class Redis extends Pool
|
|||||||
$result = true;
|
$result = true;
|
||||||
}
|
}
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->error($exception->getMessage());
|
$this->error($exception);
|
||||||
$result = false;
|
$result = false;
|
||||||
} finally {
|
} finally {
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user