mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
error handle to all: VlIntException
This commit is contained in:
1 parent
96650c8f42
commit
30dd00ffb4
5 files changed
+21
-20
No files matched your search
@@ -38,7 +38,7 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
* 根据 TLV Block 创建一个 SignatureInfo
|
||||
* @param block
|
||||
*/
|
||||
public SignatureInfo(Block block){
|
||||
public SignatureInfo(Block block) throws VlIntException {
|
||||
this.buildSignatureInfoByBlock(block);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
* @param block
|
||||
* @return
|
||||
*/
|
||||
public boolean buildSignatureInfoByBlock(Block block){
|
||||
public boolean buildSignatureInfoByBlock(Block block) throws VlIntException {
|
||||
return this.wireDecode(block);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
// 编码 TLV-TYPE
|
||||
tmplen=encoder.prependVarNumber(new VlInt(TLV.TlvSignatureInfo));
|
||||
if(tmplen<=0){
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
totalLength+=tmplen;
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean wireDecode(Block block) {
|
||||
public boolean wireDecode(Block block) throws VlIntException {
|
||||
// 检查 Type 是否正确
|
||||
if(!TLV.expectType(block.getType(),new VlInt(TLV.TlvSignatureInfo))){
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user