From 3d3e48844329ba017846729aabc7846dcfa11ef2 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 28 Aug 2019 17:45:25 +0800 Subject: [PATCH] Show error stack from plugins --- app/Exceptions/Handler.php | 4 +++- resources/misc/changelogs/en/next.md | 1 + resources/misc/changelogs/zh_CN/next.md | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index c924f613..52573ffe 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -4,6 +4,7 @@ namespace App\Exceptions; use Exception; use Illuminate\Support\Arr; +use Illuminate\Support\Str; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler @@ -38,7 +39,8 @@ class Handler extends ExceptionHandler return $trace; }) ->filter(function ($trace) { - return \Illuminate\Support\Str::startsWith($trace['file'], 'app'); + return Str::startsWith($trace['file'], 'app') || + Str::contains($trace['file'], resolve('plugins')->getPluginsDirs()->all()); }) ->values(), ]; diff --git a/resources/misc/changelogs/en/next.md b/resources/misc/changelogs/en/next.md index 52066e43..76f0840d 100644 --- a/resources/misc/changelogs/en/next.md +++ b/resources/misc/changelogs/en/next.md @@ -19,6 +19,7 @@ - Some fields at administration panel shouldn't be sortable. - Add missing l10n text. - Fixed that model was reset after resetting skin previewing. +- Fixed that error stack doesn't show paths from plugins when AJAX has an error. ## Removed diff --git a/resources/misc/changelogs/zh_CN/next.md b/resources/misc/changelogs/zh_CN/next.md index b2a9412c..861096e2 100644 --- a/resources/misc/changelogs/zh_CN/next.md +++ b/resources/misc/changelogs/zh_CN/next.md @@ -19,6 +19,7 @@ - 管理面板的列表中某些字段不应是可排序的 - 补充部分缺失的语言文本 - 重置皮肤预览后,皮肤模型也被重置的问题 +- AJAX 出现错误时,堆栈中不显示来自插件的部分 ## 移除