fix: change the way to check a type whether a exception - #106
Merged
Conversation
gxcsoccer
force-pushed
the
fix-exception-identify
branch
from
May 21, 2018 08:30
8d87fb1 to
3d57587
Compare
Member
|
能100%兼容原来的逻辑吗?可以的话+1 |
Member
Author
以前应该是 100%,因为如果以前判断出来是 Exception(前提是没判断错),那用现在判断出来肯定也是 Exception。唯一的问题在于,如果遇到变态的 class,包含和 Exception 基类一样的属性,这样可能会误判断为 exception 来处理 |
Member
Author
|
1.8.2 |
XadillaX
reviewed
May 21, 2018
| } | ||
| } | ||
| if (/Exception$/.test(classname)) { | ||
| if (errorPropCount === 3) { |
theweipeng
pushed a commit
to theweipeng/hessian.js
that referenced
this pull request
Apr 11, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
以前根据正则来判断不太严谨,上周大佬们开发时候,服务端一个异常对象叫 ErrorContext 不是 Exception 结尾的,没有识别出来,导致错误栈打出来比较奇怪