Background Task error caption change

Hi all,
Please does anyone have any idea of how I can change the background task caption when there is an error in the handleException method? I want a meaningful caption displayed.

See the image below:

https://docs.jmix.io/1.x/jmix/1.5/ui/background-tasks.html#basics

Please assist.
Thanks

Hi,

Could you please explain what is a “background task caption when there is an error in the handleException method”? If possible, please provide screenshots of what you’re talking about or a sample project that demonstrates your problem.

Hi Maxim,
Thanks for the reply.
I thought I attached the screenshot. See below:
image

I want a situation where I can change this caption “backgroundWorkProgress.executionError”

I think the error comes from the message.properties
See the class io.jmix.ui.executor.LocalizedTaskWrapper, method: showExecutionError
Also, see the message.properties : The message does not have the group id which is the package where it is being called from.

image


 protected void showExecutionError(Exception ex) {
        Screen ownerFrame = wrappedTask.getOwnerScreen();
        if (ownerFrame != null) {
            Dialogs dialogs = getScreenContext().getDialogs();

            dialogs.createExceptionDialog()
                    .withThrowable(ex)
                    .withCaption(messages.getMessage(LocalizedTaskWrapper.class, "backgroundWorkProgress.executionError"))
                    .withMessage(ex.getLocalizedMessage())
                    .show();
        }
    }

Thank you for reporting the problem. I’ve created an issue.