Created
January 29, 2009 17:58
-
-
Save DanielVF/54651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in public void Update() | |
//change | |
if (updateResult.Errors) { throw new CouldNotUploadBudget(); } | |
//to | |
if (updateResult.Errors) { throw new CouldNotUploadBudget( this, updateResult); } | |
//change | |
public class CouldNotUploadBudget : System.Exception { } | |
//to | |
public class CouldNotUploadBudget : System.Exception { | |
public BudgetUpdate budgetUpdate; | |
public BudgetUpdateResult updateResult; | |
public CouldNotUploadBudget(BudgetUpdate budgetUpdate, BudgetUpdateResult updateResult){ | |
this.budgetUpdate=budgetUpdate; | |
this.updateResult=updateResult; | |
} | |
public string errors(){ | |
string errors = ""; | |
foreach (WS.UpdateElementResult detail in this.updateResult.Details){ | |
errors = errors + detail.Message +". "; | |
} | |
return errors; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment