Javadoc
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.