|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.fr.env.handler.impl; |
|
|
|
|
|
|
|
|
|
import com.fanruan.workplace.http.RepositoryManager; |
|
|
|
|
import com.fr.env.handler.Handler; |
|
|
|
|
import com.fr.env.handler.RefWrapper; |
|
|
|
|
import com.fr.env.handler.ResultWrapper; |
|
|
|
@ -17,6 +18,7 @@ public class CancelHandler implements Handler<RefWrapper, ResultWrapper> {
|
|
|
|
|
@Override |
|
|
|
|
public ResultWrapper handle(RefWrapper wrapper) { |
|
|
|
|
Throwable e = wrapper.getThrowable(); |
|
|
|
|
RepositoryManager.getInstance().rollBack(); |
|
|
|
|
return new ResultWrapper(!(e instanceof CancellationException), e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|