ApiController.InternalServerError 方法

定义

重载

InternalServerError()

InternalServerErrorResult 创建 (500 内部服务器错误) 。

InternalServerError(Exception)

创建具有 ExceptionResult 指定异常的 (500 内部服务器错误) 。

InternalServerError()

Source:
ApiController.cs
Source:
ApiController.cs

InternalServerErrorResult 创建 (500 内部服务器错误) 。

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.InternalServerErrorResult InternalServerError ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member InternalServerError : unit -> System.Web.Http.InternalServerErrorResult
override this.InternalServerError : unit -> System.Web.Http.InternalServerErrorResult
Public Overridable Function InternalServerError () As InternalServerErrorResult

返回

一个 InternalServerErrorResult

属性

适用于

InternalServerError(Exception)

Source:
ApiController.cs
Source:
ApiController.cs

创建具有 ExceptionResult 指定异常的 (500 内部服务器错误) 。

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.ExceptionResult InternalServerError (Exception exception);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member InternalServerError : Exception -> System.Web.Http.ExceptionResult
override this.InternalServerError : Exception -> System.Web.Http.ExceptionResult
Public Overridable Function InternalServerError (exception As Exception) As ExceptionResult

参数

exception
Exception

要在错误中包含的异常。

返回

ExceptionResult具有指定异常的 。

属性

适用于