added compiler scope to the exception thats thrown

This commit is contained in:
James Strachan
2012-07-05 08:52:19 +01:00
parent 276bfae401
commit 2090b422c0
@@ -25,6 +25,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.descriptors.*;
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
import org.jetbrains.jet.lang.psi.*;
import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo;
import org.jetbrains.jet.lang.resolve.name.Name;
@@ -361,7 +362,12 @@ public class DescriptorResolver {
Collections.<ValueParameterDescriptor>emptyList(), Visibilities.INTERNAL);
if (object != null) {
trace.record(CONSTRUCTOR, object, constructorDescriptor);
try {
trace.record(CONSTRUCTOR, object, constructorDescriptor);
}
catch (RuntimeException e) {
throw new RuntimeException(e.getMessage() + " at " + DiagnosticUtils.atLocation(object), e);
}
}
return constructorDescriptor;
}