CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::Net::Details_WebException Class Reference

Represents the exception that is thrown by WebRequest when an error occurs. Never create instances of this class manually. Use the WebException class instead. Never wrap the WebException class instances into System::SmartPtr. More...

#include <web_exception.h>

Inherits Details_InvalidOperationException.

Public Member Functions

virtual ~Details_WebException ()
 Destructs the current instance. More...
 
WebExceptionStatus get_Status ()
 Returns the status code. More...
 
System::SharedPtr< WebResponseget_Response ()
 Returns the web response with which the current exception is associated. More...
 
 Details_WebException ()
 Constructs a new instance. More...
 
 Details_WebException (String message)
 Constructs a new instance. More...
 
 Details_WebException (String message, Exception innerException)
 Constructs a new instance. More...
 
 Details_WebException (String message, WebExceptionStatus status)
 Constructs a new instance. More...
 
 Details_WebException (String message, Exception innerException, WebExceptionStatus status, System::SharedPtr< WebResponse > response)
 Constructs a new instance. More...
 

Static Public Member Functions

static Exception CreateCompatibleException (Exception exception)
 Is not implemented. More...
 

Protected Member Functions

void DoThrow (const System::ExceptionPtr &self) const override
 Throws exception instance wrapped by exception wrapper. More...
 

Detailed Description

Represents the exception that is thrown by WebRequest when an error occurs. Never create instances of this class manually. Use the WebException class instead. Never wrap the WebException class instances into System::SmartPtr.

Constructor & Destructor Documentation

◆ ~Details_WebException()

virtual System::Net::Details_WebException::~Details_WebException ( )
virtual

Destructs the current instance.

◆ Details_WebException() [1/5]

System::Net::Details_WebException::Details_WebException ( )

Constructs a new instance.

◆ Details_WebException() [2/5]

System::Net::Details_WebException::Details_WebException ( String  message)

Constructs a new instance.

Parameters
messageThe error description.

◆ Details_WebException() [3/5]

System::Net::Details_WebException::Details_WebException ( String  message,
Exception  innerException 
)

Constructs a new instance.

Parameters
messageThe exception message.
innerExceptionThe inner exception.

◆ Details_WebException() [4/5]

System::Net::Details_WebException::Details_WebException ( String  message,
WebExceptionStatus  status 
)

Constructs a new instance.

Parameters
messageThe exception message.
statusThe status code.

◆ Details_WebException() [5/5]

System::Net::Details_WebException::Details_WebException ( String  message,
Exception  innerException,
WebExceptionStatus  status,
System::SharedPtr< WebResponse response 
)

Constructs a new instance.

Parameters
messageThe exception message.
innerExceptionThe inner exception.
statusThe status code.
responseThe web response with which the current exception is associated.

Member Function Documentation

◆ CreateCompatibleException()

static Exception System::Net::Details_WebException::CreateCompatibleException ( Exception  exception)
static

Is not implemented.

◆ DoThrow()

void System::Net::Details_WebException::DoThrow ( const System::ExceptionPtr self) const
inlineoverrideprotected

Throws exception instance wrapped by exception wrapper.

Parameters
selfException instance to be thrown.

◆ get_Response()

System::SharedPtr< WebResponse > System::Net::Details_WebException::get_Response ( )

Returns the web response with which the current exception is associated.

Returns
The web response with which the current exception is associated.

◆ get_Status()

WebExceptionStatus System::Net::Details_WebException::get_Status ( )

Returns the status code.

Returns
The status code.