-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThinkPHP6多应用模式 #8
Comments
我试试 |
我在多应用下 抛出一个异常 没发现问题。 访问路径 要不你试试这个 demo |
Demo没问题,我再补充一下,我的多应用是把provider.php和ExceptionHandle.php复制进我的多应用目录里,然后我把provider.php里的handle=>我在多应用目录那个新的 , 还是说这种方式是不对的,我应该多应用下像demo一样只用一套handle,然后用if分别处理来自api和网页的异常呢 |
估计是被当前应用下 暂时可以换成这样 方式1
<?php
use think\Whoops\RenderExceptionWithWhoops;
use app\Request;
// 容器Provider定义文件
return [
'think\Request' => Request::class,
'think\exception\Handle' => RenderExceptionWithWhoops::class,
]; 方式2去除应用下的 |
看你上面说的(要区分api 与 网页)的异常, 是不是有后续操作(类似写日志) |
稍等我也传个demo |
Demo https://gitee.com/fafen/test.git 由于我在多应用下的ExceptionHandle调整 json结构的异常会输出只有json结构的页面,但是app_debug打开时,会交给系统处理,现在的问题是whoops识别不到了,出现的是原生异常页面,代码在app\api\ExceptionHandle |
请问,在ExceptionHandle自定义异常之后,app_debug和enable是打开状态,return parent::render($request,$e); 是原生的异常页面,单应用模式下是正常的,应该如何在多应用模式下自行调整继续使用呢,我看不太懂源码是怎样运转的
The text was updated successfully, but these errors were encountered: