Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sentinel
Commits
bb4e75e0
Commit
bb4e75e0
authored
Jun 03, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
ba505a4b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
ExceptionHandler.java
...main/java/com/egolm/sentinel/config/ExceptionHandler.java
+2
-2
SqlTestController.java
src/main/java/com/egolm/sentinel/web/SqlTestController.java
+1
-2
No files found.
src/main/java/com/egolm/sentinel/config/ExceptionHandler.java
View file @
bb4e75e0
...
...
@@ -29,10 +29,10 @@ public class ExceptionHandler implements HandlerExceptionResolver {
logger
.
debug
(
ex
.
getMessage
());
}
}
else
{
mav
.
addAllObjects
(
Rjx
.
jsonErr
().
setMessage
(
"未处理异常"
));
mav
.
addAllObjects
(
Rjx
.
jsonErr
().
set
(
"stack"
,
toStackString
(
ex
)).
set
Message
(
"未处理异常"
));
}
}
catch
(
Exception
e
)
{
mav
.
addAllObjects
(
Rjx
.
jsonErr
().
setMessage
(
"异常处理失败"
));
mav
.
addAllObjects
(
Rjx
.
jsonErr
().
set
(
"stack"
,
toStackString
(
e
)).
set
Message
(
"异常处理失败"
));
}
finally
{
if
(
displayInLog
)
{
logger
.
error
(
""
,
ex
);
...
...
src/main/java/com/egolm/sentinel/web/SqlTestController.java
View file @
bb4e75e0
...
...
@@ -5,7 +5,6 @@ import java.sql.Connection;
import
java.sql.DriverManager
;
import
java.sql.ResultSet
;
import
java.sql.ResultSetMetaData
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.LinkedHashMap
;
...
...
@@ -104,7 +103,7 @@ public class SqlTestController {
return
Rjx
.
jsonOk
().
setData
(
resultSetList
);
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
return
Rjx
.
jsonOk
().
set
Message
(
ExceptionHandler
.
toStackString
(
e
).
toString
());
return
Rjx
.
jsonOk
().
set
(
"stack"
,
ExceptionHandler
.
toStackString
(
e
).
toString
());
}
finally
{
try
{
if
(
connection
!=
null
&&
!
connection
.
isClosed
())
{
...
...
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