error handle to all: EncoderException

This commit is contained in:
free will committed 2021-03-18 11:22:49 +08:00
1 parent 5fc080ca6c
commit 8cf6ed24c9
34 files changed
+700 -233

No files matched your search

+4 -4
View File
@@ -104,7 +104,7 @@ public class Interest implements InteractWithField,IEncodingAble{
* @return
*/
@Override
public boolean fillDataToFields() {
public boolean fillDataToFields() throws EncoderException {
/////////////////////////////////////////////////////////////
//// 填充可变区
/////////////////////////////////////////////////////////////
@@ -201,7 +201,7 @@ public class Interest implements InteractWithField,IEncodingAble{
* @return
*/
@Override
public boolean extraDataFromFields() {
public boolean extraDataFromFields() throws VlIntException {
/////////////////////////////////////////////////////////////
//// 解析可变区
// { => 可变区
@@ -292,7 +292,7 @@ public class Interest implements InteractWithField,IEncodingAble{
* @return
*/
@Override
public int wireEncode(Encoder encoder) {
public int wireEncode(Encoder encoder) throws EncoderException {
// 首先将各项属性填充到分区当中
if(!this.fillDataToFields()){
return 0;
@@ -310,7 +310,7 @@ public class Interest implements InteractWithField,IEncodingAble{
* @return
*/
@Override
public boolean wireDecode(Block block) {
public boolean wireDecode(Block block) throws VlIntException {
if(!this.minPacket.wireDecode(block)){
return false;
}