Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

Creating a custom fault for a task

$
0
0

I'm developing a vSphere plugin that creates a custom task.

 

In case of failure, I would like to set a customized error message. The only method I found for setting the error is using

 

setTaskState(task, TaskInfoState.error, null, fault);

 

But it seems that the error state can only be a subcalss of MethodFault.

I tried to create a custom sub class, but the vSphere server complains that it doesn't know it.

 

Is there any way I can use to set a custom failure message?

 

Thanks in davance for the help


Viewing all articles
Browse latest Browse all 1860


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>