mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-6333 Restrict error notification content for "run report" errors
This commit is contained in:
parent
af6f956b49
commit
cc28ab0ccb
@ -25,7 +25,6 @@ import com.haulmont.cuba.gui.components.Window;
|
||||
import com.haulmont.cuba.gui.executors.BackgroundTask;
|
||||
import com.haulmont.cuba.gui.executors.BackgroundWorker;
|
||||
import com.haulmont.cuba.gui.executors.TaskLifeCycle;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -122,18 +121,10 @@ public class LocalizedTaskWrapper<T, V> extends BackgroundTask<T, V> {
|
||||
protected void showExecutionError(Exception ex) {
|
||||
Frame ownerFrame = wrappedTask.getOwnerFrame();
|
||||
if (ownerFrame != null) {
|
||||
String localizedMessage = ex.getLocalizedMessage();
|
||||
|
||||
Messages messages = AppBeans.get(Messages.NAME);
|
||||
if (StringUtils.isNotBlank(localizedMessage)) {
|
||||
ownerFrame.showNotification(
|
||||
messages.getMessage(LocalizedTaskWrapper.class, "backgroundWorkProgress.executionError"),
|
||||
localizedMessage, NotificationType.WARNING);
|
||||
} else {
|
||||
ownerFrame.showNotification(
|
||||
messages.getMessage(LocalizedTaskWrapper.class, "backgroundWorkProgress.executionError"),
|
||||
NotificationType.WARNING);
|
||||
}
|
||||
window.getWindowManager().showExceptionDialog(
|
||||
ex,
|
||||
AppBeans.get(Messages.class).getMessage(LocalizedTaskWrapper.class, "backgroundWorkProgress.executionError"),
|
||||
ex.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user