capture speedup - do not fill stacktrace for AbsentInformationException

This commit is contained in:
Egor.Ushakov
2017-03-02 20:51:24 +03:00
parent 82354ae7d2
commit b533af0f68
2 changed files with 39 additions and 3 deletions
@@ -0,0 +1,30 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.debugger.engine.evaluation;
/**
* @author egor
*/
public class AbsentInformationEvaluateException extends EvaluateException {
public AbsentInformationEvaluateException(String msg, Throwable th) {
super(msg, th);
}
@Override
public synchronized Throwable fillInStackTrace() {
return this;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,8 +44,14 @@ public class EvaluateExceptionUtil {
}
public static EvaluateException createEvaluateException(String msg, Throwable th) {
final String message = msg != null? msg + ": " + reason(th) : reason(th);
return new EvaluateException(message, th instanceof EvaluateException ? th.getCause() : th);
String message = msg != null ? msg + ": " + reason(th) : reason(th);
if (th instanceof EvaluateException) {
th = th.getCause();
}
if (th instanceof AbsentInformationException) {
return new AbsentInformationEvaluateException(message, th);
}
return new EvaluateException(message, th);
}
public static EvaluateException createEvaluateException(String reason) {