Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IncomeCalculator
Overview
Overview
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
neel
IncomeCalculator
Commits
8df13ec2
Commit
8df13ec2
authored
Apr 29, 2020
by
neel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling Try catch with Error code and message
parent
56411dfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/main/java/com/iRecruit/modules/auth/controller/LeaderCalc.java
+2
-2
src/main/java/com/iRecruit/modules/auth/service/impl/LeaderCalcServiceImpl.java
+2
-2
No files found.
src/main/java/com/iRecruit/modules/auth/controller/LeaderCalc.java
View file @
8df13ec2
...
@@ -75,7 +75,7 @@ public class LeaderCalc {
...
@@ -75,7 +75,7 @@ public class LeaderCalc {
}
catch
(
ResourceNotFoundException
e
)
{
}
catch
(
ResourceNotFoundException
e
)
{
calc
=
new
JSONObject
();
calc
=
new
JSONObject
();
calc
.
put
(
"Error_Code"
,
"50
0
"
);
calc
.
put
(
"Error_Code"
,
"50
3
"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
System
.
out
.
println
(
e
);
System
.
out
.
println
(
e
);
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -83,7 +83,7 @@ public class LeaderCalc {
...
@@ -83,7 +83,7 @@ public class LeaderCalc {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
calc
=
new
JSONObject
();
calc
=
new
JSONObject
();
calc
.
put
(
"Error_Code"
,
"50
0
"
);
calc
.
put
(
"Error_Code"
,
"50
3
"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
e
.
printStackTrace
();
e
.
printStackTrace
();
System
.
out
.
println
(
e
);
System
.
out
.
println
(
e
);
...
...
src/main/java/com/iRecruit/modules/auth/service/impl/LeaderCalcServiceImpl.java
View file @
8df13ec2
...
@@ -25,10 +25,10 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -25,10 +25,10 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
LeaderCalcConfig
leaderCalcConfig
;
LeaderCalcConfig
leaderCalcConfig
;
public
JSONObject
calculate
(
String
data
)
{
public
JSONObject
calculate
(
String
data
)
{
JSONObject
Calc_JSON
=
null
;
JSONObject
InputData
=
new
JSONObject
(
data
);
JSONObject
InputData
=
new
JSONObject
(
data
);
Calc_JSON
=
InputData
.
getJSONObject
(
"CALC_JSON"
);
JSONObject
Calc_JSON
=
InputData
.
getJSONObject
(
"CALC_JSON"
);
String
leader_code
=
Calc_JSON
.
getString
(
"LEADER_CODE"
);
String
leader_code
=
Calc_JSON
.
getString
(
"LEADER_CODE"
);
String
leader_designation
=
Calc_JSON
.
getString
(
"LEADER_DESIGNATION"
);
String
leader_designation
=
Calc_JSON
.
getString
(
"LEADER_DESIGNATION"
);
...
...
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