It's all about the answers!

Ask a question

how to show custom error message to the user on exception while saving work item for operation participant

Surender Biyyala (403748) | asked Apr 19 '14, 3:18 p.m.

I Developed an operation participant for setting the Iteration planned attribute to current iteration and when there is no current iteration for the timeline it should give a proper error message to the user.
 I handled this using the following code snippet

                           throw new TeamRepositoryException(

it is working fine but my concern is 

The custom message is shown in the Team Advisor view but not beside the workitem name.

beside the work item name Im getting the following message

'Exception Running followup Action'

can this be done ?


sam detweiler commented Apr 20 '14, 8:25 a.m.

I do not think you can provide a better message.

Surender Biyyala commented Apr 20 '14, 4:20 p.m.

Thanks sam for

but my concern is that i n the Team Advisor view it is showing as


UnHandled exception

then my custom message

Reason :

here comes the description of my plugin.

I dont want the Unhandled exception message under the problem and under reason I want my custom message to be displayed but not the description.

My second concern is that cant we show the custom message just beside the workitem name instead of showing that in Team advisor view.

Surender Biyyala commented Apr 21 '14, 2:54 p.m.

we can do the following instead of throwing the TeamRepositoryException. 

IReportInfo info = collector.createInfo("message to be displayed beside the work item name", "problem information");

setting the severity to error will not save the workitem
if we dont set the severity it will save the work item.

One answer

permanent link
Ralph Schoon (63.2k33646) | answered May 05 '14, 4:54 a.m.
As far as I know there is no way to provide the error message somewhere else.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.