TSHOCKPLUGINS-2 #resolve #comment Added.

This commit is contained in:
Lucas Nicodemus 2012-01-03 15:29:36 -07:00
parent 5d61a56fcd
commit 264e633202

View file

@ -127,6 +127,8 @@ namespace Rests
}
protected virtual object ProcessRequest(object sender, RequestEventArgs e)
{
try
{
var uri = e.Request.Uri.AbsolutePath;
uri = uri.TrimEnd('/');
@ -154,6 +156,17 @@ namespace Rests
if (obj != null)
return obj;
}
}
catch (Exception exception)
{
return new Dictionary<string, string>
{
{"status", "500"},
{"error", "Internal server error."},
{"errormsg", exception.Message},
{"stacktrace", exception.StackTrace},
};
}
return new Dictionary<string, string>
{
{"status", "404"},