Back to product page

CreateErrorResponse method


Creates custom error and fills in Response automatically.

Type

Void

Syntax

  • C#
  • VB.NET
Void CreateErrorResponse(Int32 ErrorCode, String ErrorText, String Description);
The CreateErrorResponse(ErrorCode,ErrorText,Description) syntax has these parts:
ErrorCodeCustom error code.
ErrorTextCustom error text.
DescriptionA text describing the error that you provided.

Sub CreateErrorResponse(ByVal ErrorCode As Int32, ByVal ErrorText As String, ByVal Description As String)
The CreateErrorResponse(ErrorCode,ErrorText,Description) syntax has these parts:
ErrorCodeCustom error code.
ErrorTextCustom error text.
DescriptionA text describing the error that you provided.

Remarks

You should use this method when you want wodWebServer.NET to create default error-text response. Typically, if page does not exist, you can use this method to set predefined StatusCode to 404, to create response Body that explains why 404 occurred etc.

Platforms

Windows