File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/com/github/_1c_syntax/bsl/languageserver/aop Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 26
26
import org .aspectj .lang .annotation .AfterThrowing ;
27
27
import org .aspectj .lang .annotation .Aspect ;
28
28
29
+ import javax .annotation .PreDestroy ;
29
30
import java .util .concurrent .CompletableFuture ;
30
31
import java .util .concurrent .ExecutorService ;
31
32
import java .util .concurrent .Executors ;
@@ -39,6 +40,11 @@ public class SentryAspect {
39
40
40
41
private final ExecutorService executorService = Executors .newCachedThreadPool ();
41
42
43
+ @ PreDestroy
44
+ public void onDestroy () {
45
+ executorService .shutdown ();
46
+ }
47
+
42
48
@ AfterThrowing (value = "Pointcuts.isBSLDiagnostic() && Pointcuts.isGetDiagnosticsCall()" , throwing = "ex" )
43
49
public void logThrowingBSLDiagnosticGetDiagnostics (Throwable ex ) {
44
50
CompletableFuture .runAsync (() -> Sentry .captureException (ex ), executorService );
You can’t perform that action at this time.
0 commit comments