java.io.ObjectOutputStream.writeNewException()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中java.io.ObjectOutputStream.writeNewException()方法的一些代码示例,展示了ObjectOutputStream.writeNewException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeNewException()方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeNewException

ObjectOutputStream.writeNewException介绍

[英]Write exception ex into the receiver. It is assumed the exception has not been dumped yet. Returns the handle for this object (exception) which is dumped here. This is used to dump the exception instance that happened (if any) when dumping the original object graph. The set of seen objects will be reset just before and just after dumping this exception object. When exceptions are found normally in the object graph, they are dumped as a regular object, and not by this method. In that case, the set of "known objects" is not reset.
[中]将异常ex写入接收器。假设该异常尚未被转储。返回在此转储的对象(异常)的句柄。这用于转储在转储原始对象图时发生的异常实例(如果有)。所看到的对象集将在转储此异常对象之前和之后重置。当在对象图中正常发现异常时,它们将作为常规对象转储,而不是通过此方法。在这种情况下,“已知对象”的集合不会重置。

代码示例

代码示例来源:origin: robovm/robovm

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: ibinti/bugvm

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: MobiVM/robovm

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: FlexoVM/flexovm

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: com.bugvm/bugvm-rt

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: com.jtransc/jtransc-rt

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

代码示例来源:origin: com.gluonhq/robovm-rt

writeNewException(ioEx1);
} catch (IOException ioEx2) {
  nestedException.fillInStackTrace();

相关文章

ObjectOutputStream类方法