Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Easy Http SDK
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Back End
Easy Http SDK
Commits
5f2fcc25
Commit
5f2fcc25
authored
Feb 20, 2023
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复错误上下文写入
parent
66e213ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Application.php
src/Application.php
+1
-1
ArgsRecorder.php
src/Helper/ArgsRecorder.php
+5
-1
No files found.
src/Application.php
View file @
5f2fcc25
...
...
@@ -228,7 +228,7 @@ class Application implements ClientInterface
if
(
$this
->
logger
)
{
$this
->
logger
->
warning
(
"Error"
,
$this
->
lastRequestContext
);
}
throw
new
SdkException
(
$exception
->
getMessage
(),
$request
,
$response
,
$
rpcResult
);
throw
new
SdkException
(
$exception
->
getMessage
(),
$request
,
$response
,
$
exception
->
getOptions
()
);
}
catch
(
UnknowResultException
$exception
)
{
// 无法解析,转化为 Application Exception
// 日志中保留 OUT PUT
...
...
src/Helper/ArgsRecorder.php
View file @
5f2fcc25
...
...
@@ -4,6 +4,7 @@ namespace Jiwei\EasyHttpSdk\Helper;
trait
ArgsRecorder
{
/**
* @param string $func
* @param array $params
...
...
@@ -15,6 +16,9 @@ trait ArgsRecorder
try
{
$reflectionFunction
=
new
\ReflectionMethod
(
$func
);
foreach
(
$reflectionFunction
->
getParameters
()
as
$key
=>
$parameter
)
{
if
(
in_array
(
$key
,
[
'then'
,
'catch'
]))
{
continue
;
}
$result
[
$parameter
->
name
]
=
$params
[
$key
]
??
null
;
}
}
catch
(
\ReflectionException
$exception
)
{
...
...
@@ -22,4 +26,4 @@ trait ArgsRecorder
}
return
$result
;
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment