Exemplo n.º 1
0
        private static string GetMessage(StreamingClientExceptionType type)
        {
            switch (type)
            {
            case StreamingClientExceptionType.Server:
                return("A server error has occurred while streaming the image.");

            case StreamingClientExceptionType.Network:
                return("A network error has occurred while streaming the image.");

            case StreamingClientExceptionType.Protocol:
                return("A protocol error has occurred while streaming the image.");

            case StreamingClientExceptionType.Access:
                return("An access error has occurred while streaming the image.");

            case StreamingClientExceptionType.UnexpectedResponse:
                return("An unexpected response was received while streaming the image.");

            case StreamingClientExceptionType.Generic:
            default:
                return("An error has occurred while streaming the image.");
            }
        }
Exemplo n.º 2
0
 internal StreamingClientException(HttpStatusCode httpStatusCode, string httpStatusDescription)
     : base(GetMessage(ClassifyHttpStatusCode(httpStatusCode)), ConstructHttpInnerException(httpStatusCode, httpStatusDescription))
 {
     this.Type           = ClassifyHttpStatusCode(httpStatusCode);
     this.HttpStatusCode = (int)httpStatusCode;
 }
Exemplo n.º 3
0
 internal StreamingClientException(StreamingClientExceptionType type, Exception innerException)
     : base(GetMessage(type), innerException)
 {
     this.Type           = type;
     this.HttpStatusCode = -1;
 }
Exemplo n.º 4
0
		internal StreamingClientException(HttpStatusCode httpStatusCode, string httpStatusDescription)
			: base(GetMessage(ClassifyHttpStatusCode(httpStatusCode)), ConstructHttpInnerException(httpStatusCode, httpStatusDescription))
		{
			this.Type = ClassifyHttpStatusCode(httpStatusCode);
			this.HttpStatusCode = (int) httpStatusCode;
		}
Exemplo n.º 5
0
		internal StreamingClientException(StreamingClientExceptionType type, Exception innerException)
			: base(GetMessage(type), innerException)
		{
			this.Type = type;
			this.HttpStatusCode = -1;
		}
Exemplo n.º 6
0
		private static string GetMessage(StreamingClientExceptionType type)
		{
			switch (type)
			{
				case StreamingClientExceptionType.Server:
					return "A server error has occurred while streaming the image.";
				case StreamingClientExceptionType.Network:
					return "A network error has occurred while streaming the image.";
				case StreamingClientExceptionType.Protocol:
					return "A protocol error has occurred while streaming the image.";
				case StreamingClientExceptionType.Access:
					return "An access error has occurred while streaming the image.";
				case StreamingClientExceptionType.UnexpectedResponse:
					return "An unexpected response was received while streaming the image.";
				case StreamingClientExceptionType.Generic:
				default:
					return "An error has occurred while streaming the image.";
			}
		}