Closed yuzelin closed 2 days ago
I think the second call to RollingFileWriter#abort is in RollingFileWriter#write's catch statement. But where was the first call to RollingFileWriter#abort?
I think the second call to RollingFileWriter#abort is in RollingFileWriter#write's catch statement. But where was the first call to RollingFileWriter#abort?
I mean RollingFileWriter will call currentWriter#abort when #write
has exception, then it will call currentWriter#abort again.
I think the second call to RollingFileWriter#abort is in RollingFileWriter#write's catch statement. But where was the first call to RollingFileWriter#abort?
I mean RollingFileWriter will call currentWriter#abort when
#write
has exception, then it will call currentWriter#abort again.
OK, Thinks. The first time is in RollingFileWriter#write -> SingleFileWriter#write -> SingleFileWriter#writeImpl -> SingleFileWriter#abort. The second time is in RollingFileWriter#write -> RollingFileWriter#abort -> SingleFileWriter#abort.
Fixed in #4547
Purpose
For example,
currentWriter#write
occurs exceptionE1
, it will abort, then theRollingFileWriter#abort
will abortcurrentWriter
again. SomeOutputStream
cannot be closed twice, so it will throw an new exceptionE2
which coversE1
.Tests
API and Format
Documentation