$exception->getName(), 'errorMessage' => $exception->getMessage(), ]; } return parent::convertExceptionToArray($exception); } public function logException($exception) { if ($exception instanceof AuthserverException) { Yii::error($exception, AuthserverException::class . ':' . $exception->getName()); } elseif ($exception instanceof SessionServerException) { Yii::error($exception, SessionServerException::class . ':' . $exception->getName()); } else { parent::logException($exception); } } }