Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
ee6f7988
Commit
ee6f7988
authored
Oct 29, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] add log for exception
parent
6547493e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
AtmsExceptionHandler.java
...ava/pwc/taxtech/atms/controller/AtmsExceptionHandler.java
+10
-1
CellTemplateServiceImpl.java
...wc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
+2
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/AtmsExceptionHandler.java
View file @
ee6f7988
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
...
...
@@ -11,13 +13,20 @@ import pwc.taxtech.atms.exception.ServiceException;
@ControllerAdvice
public
class
AtmsExceptionHandler
extends
ResponseEntityExceptionHandler
{
private
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
AtmsExceptionHandler
.
class
);
@ExceptionHandler
(
value
=
{
ApplicationException
.
class
,
ServiceException
.
class
})
protected
ResponseEntity
<
Object
>
handleExceptions
(
Exception
ex
)
throws
ServiceException
{
logger
.
error
(
"Rest Exception!"
,
ex
);
LOGGER
.
error
(
"Rest Exception!"
,
ex
);
ex
.
printStackTrace
();
if
(
ex
.
getMessage
()
!=
null
)
{
LOGGER
.
debug
(
"Rest Exception for {}"
,
ex
.
getMessage
());
LOGGER
.
info
(
"Rest Exception for {]"
,
ex
.
getMessage
());
}
if
(
ex
instanceof
ApplicationException
)
{
ex
.
printStackTrace
();
return
handleApplicationException
((
ApplicationException
)
ex
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
View file @
ee6f7988
...
...
@@ -254,7 +254,7 @@ public class CellTemplateServiceImpl extends AbstractService {
private
String
getFormulaDataSource
(
String
formula
,
List
<
String
>
keyValueConfigIds
)
{
FormulaConfigExample
example
=
new
FormulaConfigExample
();
example
.
setOrderByClause
(
"LENGTH(F
ormulaName
) desc"
);
example
.
setOrderByClause
(
"LENGTH(F
ORMULA_NAME
) desc"
);
List
<
FormulaConfig
>
dataSourceList
=
formulaConfigMapper
.
selectByExample
(
example
);
List
<
String
>
nameList
=
new
ArrayList
<>();
FormulaHelper
formulaHelper
=
new
FormulaHelper
();
...
...
@@ -270,7 +270,7 @@ public class CellTemplateServiceImpl extends AbstractService {
String
keyValueMethodName
=
"KEYVALUE("
;
if
(
tmpFormula
.
contains
(
keyValueMethodName
))
{
KeyValueConfigExample
keyValueConfigExample
=
new
KeyValueConfigExample
();
keyValueConfigExample
.
setOrderByClause
(
"LENGTH(K
eyCode
) desc"
);
keyValueConfigExample
.
setOrderByClause
(
"LENGTH(K
EY_CODE
) desc"
);
List
<
KeyValueConfig
>
keyValueList
=
keyValueConfigMapper
.
selectByExample
(
keyValueConfigExample
);
for
(
KeyValueConfig
keyValueConfig
:
keyValueList
)
{
if
(
tmpFormula
.
contains
(
keyValueMethodName
+
"\""
+
keyValueConfig
.
getKeyCode
().
toUpperCase
()
+
"\")"
))
{
...
...
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