修改异常信息

This commit is contained in:
junj2.liang 2022-09-09 14:48:29 +08:00
parent 9ccab48de8
commit 6b5d6633a6
6 changed files with 11 additions and 11 deletions

View File

@ -28,7 +28,7 @@
<dependency> <dependency>
<groupId>com.sunyard</groupId> <groupId>com.sunyard</groupId>
<artifactId>sydapi4j</artifactId> <artifactId>sydapi4j</artifactId>
<version>1.12.20220908-3</version> <version>1.12.20220909-1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>

View File

@ -14,7 +14,7 @@ public class SydSM3 implements ISM3 {
public void update(byte[] pcData) { public void update(byte[] pcData) {
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
if (null == pcData || 0 == pcData.length) { if (null == pcData || 0 == pcData.length) {
pcData = new byte[0]; pcData = new byte[0];
@ -33,7 +33,7 @@ public class SydSM3 implements ISM3 {
public String digest() { public String digest() {
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
this.is_finished = true; this.is_finished = true;
if (null == pcProcData) { if (null == pcProcData) {

View File

@ -30,10 +30,10 @@ public class SydSM4 implements ISM4 {
} }
int plength = pcData.length; int plength = pcData.length;
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
if (plength > 4064) { if (plength > 4064) {
throw new SydApiException(0); throw new SydApiException(0x8006);
} }
if (iFlag == 1) { if (iFlag == 1) {
if (0 == queue.getLength()) { if (0 == queue.getLength()) {
@ -80,7 +80,7 @@ public class SydSM4 implements ISM4 {
public byte[] finish() { public byte[] finish() {
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
this.is_finished = true; this.is_finished = true;
if (1 == this.iPkgNum) { if (1 == this.iPkgNum) {

View File

@ -32,10 +32,10 @@ public class SydSM4Backup implements ISM4 {
} }
int plength = pcData.length; int plength = pcData.length;
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
if (plength > 4064) { if (plength > 4064) {
throw new SydApiException(0); throw new SydApiException(0x8006);
} }
if (iFlag == 1) { if (iFlag == 1) {
if (0 == sourceWrap.array().length) { if (0 == sourceWrap.array().length) {
@ -136,7 +136,7 @@ public class SydSM4Backup implements ISM4 {
public byte[] finish() { public byte[] finish() {
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
this.is_finished = true; this.is_finished = true;
if (1 == this.iPkgNum) { if (1 == this.iPkgNum) {

View File

@ -73,7 +73,7 @@ public class SydSM4Mac implements ISM4Mac {
public String disget() { public String disget() {
if (is_finished) { if (is_finished) {
throw new SydApiException(0); throw new SydApiException(0x8007);
} }
this.is_finished = true; this.is_finished = true;
if (1 == this.iPkgNum) { if (1 == this.iPkgNum) {

View File

@ -12,7 +12,7 @@
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: com.sunyard:sydapi4j:1.12.20220908-3" level="project" /> <orderEntry type="library" name="Maven: com.sunyard:sydapi4j:1.12.20220909-1" level="project" />
<orderEntry type="library" name="Maven: com.sunyard:proto:1.0-20220905" level="project" /> <orderEntry type="library" name="Maven: com.sunyard:proto:1.0-20220905" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy-all:2.4.15" level="project" /> <orderEntry type="library" name="Maven: org.codehaus.groovy:groovy-all:2.4.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.0" level="project" /> <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.0" level="project" />