Skip to content

Commit

Permalink
feat(core):optimize resolveResultCode() to add break statements for e…
Browse files Browse the repository at this point in the history
…ach switch case
  • Loading branch information
angrynurd committed Sep 26, 2024
1 parent ed3bc7e commit dca793b
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,30 +397,43 @@ private String resolveResultCode(int code) {
switch (code) {
case 0:
responseCode = "SUCCESS";
break;
case 1:
responseCode = "SIGERROR";
break;
case 2:
responseCode = "CONTRACT_VALIDATE_ERROR";
break;
case 3:
responseCode = "CONTRACT_EXE_ERROR";
break;
case 4:
responseCode = "BANDWITH_ERROR";
break;
case 5:
responseCode = "DUP_TRANSACTION_ERROR";
break;
case 6:
responseCode = "TAPOS_ERROR";
break;
case 7:
responseCode = "TOO_BIG_TRANSACTION_ERROR";
break;
case 8:
responseCode = "TRANSACTION_EXPIRATION_ERROR";
break;
case 9:
responseCode = "SERVER_BUSY";
break;
case 10:
responseCode = "NO_CONNECTION";
break;
case 11:
responseCode = "NOT_ENOUGH_EFFECTIVE_CONNECTION";
break;
case 20:
responseCode = "OTHER_ERROR";
break;
}
return responseCode;
}
Expand Down

0 comments on commit dca793b

Please sign in to comment.