本文整理匯總了Java中com.esotericsoftware.kryo.KryoException.addTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java KryoException.addTrace方法的具體用法?Java KryoException.addTrace怎麽用?Java KryoException.addTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.esotericsoftware.kryo.KryoException
的用法示例。
在下文中一共展示了KryoException.addTrace方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: write
import com.esotericsoftware.kryo.KryoException; //導入方法依賴的package包/類
public void write (Output output, Object object) {
try {
if (varIntsEnabled)
output.writeInt(field.getInt(object), false);
else
output.writeInt(field.getInt(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}
示例2: read
import com.esotericsoftware.kryo.KryoException; //導入方法依賴的package包/類
public void read (Input input, Object object) {
try {
if (varIntsEnabled)
field.setInt(object, input.readInt(false));
else
field.setInt(object, input.readInt());
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}
示例3: write
import com.esotericsoftware.kryo.KryoException; //導入方法依賴的package包/類
public void write (Output output, Object object) {
try {
output.writeByte(field.getByte(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}
示例4: read
import com.esotericsoftware.kryo.KryoException; //導入方法依賴的package包/類
public void read (Input input, Object object) {
try {
if (varIntsEnabled)
field.setLong(object, input.readLong(false));
else
field.setLong(object, input.readLong());
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}