aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-06-09 01:31:59 +0000
committerAdam Frisby2007-06-09 01:31:59 +0000
commit86a3b586f8849025ace493e0c49e074d028e0668 (patch)
treeda68492fbe6a275eb00a1569a6fda0377bc49645
parent* Just for the heck of it - added a UUID based equivilent too. (diff)
downloadopensim-SC_OLD-86a3b586f8849025ace493e0c49e074d028e0668.zip
opensim-SC_OLD-86a3b586f8849025ace493e0c49e074d028e0668.tar.gz
opensim-SC_OLD-86a3b586f8849025ace493e0c49e074d028e0668.tar.bz2
opensim-SC_OLD-86a3b586f8849025ace493e0c49e074d028e0668.tar.xz
Patched up error handling to return a better XML string.
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/UserManager.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
index cde7d59..b8c9f97 100644
--- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
+++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
@@ -657,7 +657,25 @@ namespace OpenGridServices.UserServer
657 657
658 public string CreateUnknownUserErrorResponse() 658 public string CreateUnknownUserErrorResponse()
659 { 659 {
660 return "<error>Unknown user</error>"; 660 System.IO.StringWriter sw = new System.IO.StringWriter();
661 XmlTextWriter xw = new XmlTextWriter(sw);
662
663 // Header
664 xw.Formatting = Formatting.Indented;
665 xw.WriteStartDocument();
666 xw.WriteDocType("error", null, null, null);
667 xw.WriteComment("An error occured");
668 xw.WriteStartElement("error");
669
670 // User
671 xw.WriteElementString("unknownuser", "Unable to find a user with that name");
672
673 // Footer
674 xw.WriteEndElement();
675 xw.Flush();
676 xw.Close();
677
678 return sw.ToString();
661 } 679 }
662 680
663 /// <summary> 681 /// <summary>