C# Class Octopus.Client.Exceptions.OctopusExceptionFactory

Factory for mapping HTTP errors into Octopus exceptions.
显示文件 Open project: OctopusDeploy/Octo.exe

Public Methods

Method Description
CreateException ( WebException webException, HttpWebResponse response ) : OctopusException

Creates the appropriate OctopusException from a HTTP response.

CreateException ( HttpResponseMessage response ) : Task

Creates the appropriate OctopusException from a HTTP response.

Private Methods

Method Description
CreateException ( int statusCode, string body ) : OctopusException
GetErrorMessage ( string body ) : string

Method Details

CreateException() public static method

Creates the appropriate OctopusException from a HTTP response.
public static CreateException ( WebException webException, HttpWebResponse response ) : OctopusException
webException System.Net.WebException The web exception.
response System.Net.HttpWebResponse The response.
return OctopusException

CreateException() public static method

Creates the appropriate OctopusException from a HTTP response.
public static CreateException ( HttpResponseMessage response ) : Task
response System.Net.Http.HttpResponseMessage The response.
return Task