Use multi-catch when possible
This commit is contained in:
@@ -313,10 +313,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
|
||||
return genNotNullAssertions(state, stackValue, runtimeAssertionInfo);
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (CompilationException e) {
|
||||
catch (ProcessCanceledException | CompilationException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable error) {
|
||||
|
||||
@@ -381,10 +381,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
generateSecondaryConstructor(secondaryConstructor);
|
||||
}
|
||||
}
|
||||
catch (CompilationException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
catch (CompilationException | ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
|
||||
@@ -193,10 +193,7 @@ public abstract class MemberCodegen<T extends KtPureElement/* TODO: & KtDeclarat
|
||||
try {
|
||||
functionCodegen.gen((KtNamedFunction) declaration);
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (CompilationException e) {
|
||||
catch (ProcessCanceledException | CompilationException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
@@ -207,10 +204,7 @@ public abstract class MemberCodegen<T extends KtPureElement/* TODO: & KtDeclarat
|
||||
try {
|
||||
propertyCodegen.gen((KtProperty) declaration);
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (CompilationException e) {
|
||||
catch (ProcessCanceledException | CompilationException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user