refactor: 😀代码优化
This commit is contained in:
parent
e0331a0f59
commit
5fa1d6ca8b
@ -51,15 +51,7 @@ public class ExcelHelper
|
||||
catch (Exception ex)
|
||||
{
|
||||
App.HttpContext.Response.Headers.ContentType = "application/json; charset=utf-8";
|
||||
throw Oops.Oh(new AdminResult<object>
|
||||
{
|
||||
Code = 500,
|
||||
Message = ex.Message,
|
||||
Result = null,
|
||||
Type = "error",
|
||||
Extras = UnifyContext.Take(),
|
||||
Time = DateTime.Now
|
||||
}.ToJson());
|
||||
throw Oops.Oh(AdminResultProvider.Error(ex.Message, 500).ToJson());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user