문제

I am using the PetrelLogger.NewAsyncProgress which seems to work well. However I can't figure out how to report an error with my task. Once I Dispose of the NewAsyncProgress, it reports 'Success' for my task.

I have tried setting the ProgressStatus = -1, but that didn't make a difference.

Example:

 using (_asyncProgress = PetrelLogger.NewAsyncProgress("Doing Job", ProgressType.Default, (AsyncProgressCanceledCallback)AsyncProgressCanceled, this))
 {
    try
    {
        //Do Something
        _asyncProgress.ProgressStatus = 100;
    }
    catch (Exception e)
    {
        //Error happened
       _asyncProgress.ProgressStatus = -1;
    }
 }

So if an exception is thrown, the task manager result is Success 100%. Any ideas?

도움이 되었습니까?

해결책

It's not possible in Ocean at the moment. However, we have such requirement recorded, so it can be implemented in one of future releases

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top