mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
capture speedup - do not fill stacktrace for AbsentInformationException
This commit is contained in:
+30
@@ -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;
|
||||
}
|
||||
}
|
||||
+9
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user