-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
异常类可以通过定义AlwaysErrorMsg注解 明确指定是否需要输出错误信息
该注解方式不受show_error_msg配置影响
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
namespace think\exception; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* 异常类可以定义类的注解属性 则始终输出错误信息 | ||
*/ | ||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class AlwaysErrorMsg | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters