This commit is contained in:
2020-09-10 15:58:03 +08:00
parent 389c19386b
commit 508eb0edc7
+3 -2
View File
@@ -6,6 +6,7 @@ namespace Snowflake\Abstracts;
use Exception;
use HttpServer\Exception\ExitException;
use Snowflake\Core\JSON;
/**
* Class BaseGoto
@@ -20,9 +21,9 @@ class BaseGoto extends Component
* @return mixed|void
* @throws Exception
*/
public function end($message, $statusCode = 200)
public function end(string $message, $statusCode = 200)
{
throw new ExitException($message, $statusCode);
throw new ExitException(JSON::to(12350, $message), $statusCode);
}
}