示例#1
0
        public void showError(string exceptionCode)
        {
            // First we remove old errors, so they don't get added multiple times
            clearErrors();

            if (exceptionCode == "AWS.MechanicalTurk.InsufficientFunds")
            {
                string   errorText      = @"You have run out of Mechanical Turk funds. Soylent cannot continue to post tasks.";
                string   resolutionText = @"Purchase more Mechanical Turk credit.";
                string   url            = @"https://requester.mturk.com/mturk/prepurchase";
                HITError error          = new HITError(errorText, resolutionText, url);
                stages.Children.Insert(0, error);

                HITError stubError = new HITError(errorText, resolutionText, url);
                stub.details.Children.Insert(0, stubError);
            }
            else
            {
                HITError error     = new HITError(exceptionCode);
                HITError stubError = new HITError(exceptionCode);
                stages.Children.Insert(0, error);
                stub.details.Children.Insert(0, stubError);
            }
        }
示例#2
0
        public void showError(string exceptionCode)
        {
            // First we remove old errors, so they don't get added multiple times
            clearErrors();

            if (exceptionCode == "AWS.MechanicalTurk.InsufficientFunds")
            {
                string errorText = @"You have run out of Mechanical Turk funds. Soylent cannot continue to post tasks.";
                string resolutionText = @"Purchase more Mechanical Turk credit.";
                string url = @"https://requester.mturk.com/mturk/prepurchase";
                HITError error = new HITError(errorText, resolutionText, url);
                stages.Children.Insert(0, error);

                HITError stubError = new HITError(errorText, resolutionText, url);
                stub.details.Children.Insert(0, stubError);
            }
            else
            {
                HITError error = new HITError(exceptionCode);
                HITError stubError = new HITError(exceptionCode);
                stages.Children.Insert(0, error);
                stub.details.Children.Insert(0, stubError);
            }
        }