mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлен кастомный ErrorHandler для форматирования ошибок authserver'а в соответствии с ожиданиями лаунчера
This commit is contained in:
@ -1,8 +1,19 @@
|
||||
<?php
|
||||
namespace api\modules\authserver\exceptions;
|
||||
|
||||
use ReflectionClass;
|
||||
use yii\web\HttpException;
|
||||
|
||||
class AuthserverException extends HttpException {
|
||||
|
||||
/**
|
||||
* Рефлексия быстрее, как ни странно:
|
||||
* @url https://coderwall.com/p/cpxxxw/php-get-class-name-without-namespace#comment_19313
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName() {
|
||||
return (new ReflectionClass($this))->getShortName();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user