TSHOCKPLUGINS-2 #resolve #comment Added.
This commit is contained in:
parent
5d61a56fcd
commit
264e633202
1 changed files with 34 additions and 21 deletions
|
|
@ -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"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue