using System;
namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions
{
///
/// Holds all errors can occur on the request protocol
///
public class RequestProtocolException : Exception
{
///
/// Exception occurred on this command
///
public Object Command;
///
/// Exception occurred while receiving this data
///
public Object ReceivedData;
///
/// Error is interpreted and has a define error code
/// if its not null is Genesis.Protocols.Request.Const.ConfigExErrors
///
public Int32? ConfigExErrorCode;
///
/// Error is interpreted and has a define error code
/// if its not null is Genesis.Protocols.Request.Const.HighLevelError
///
public Int32? HighLevelErrorCode;
///
/// Ctor with only message
///
/// error message
public RequestProtocolException(String message) : base(message)
{
}
///
/// Ctor with message and
///
/// error message
///
public RequestProtocolException(String message, Object command) : base(message)
{
Command = command;
ReceivedData = null;
}
///
/// Ctor with message, and
///
/// error message
///
///
public RequestProtocolException(String message, Object command, Object receivedData) : base(message)
{
Command = command;
ReceivedData = receivedData;
}
}
}