Hi ,
I trying to create the custom task and in case of error I would like to show the custom error message on vsphere client.
My code to show the error message as below :
LocalizedMethodFault lmf = new LocalizedMethodFault();
lmf.setLocalizedMessage("My Error Message");
task.setTaskState(TaskInfoState.error, null, lmf);
Using the above code I am not able to see the custom error message "My Error Message" on the vsphere client and it gives the error saying "com.vmware.vim25.InvalidRequest".
Please provide the sample code that will show the custom message on the vsphere client.
Thanks & Regards