com.eurotech.framework.protocol.modbus
Class ModbusProtocolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.eurotech.framework.protocol.modbus.ModbusProtocolException
- All Implemented Interfaces:
- Serializable
public class ModbusProtocolException
- extends Exception
The ProtocolException class is the superclass of all errors and exceptions in the ESF Protocol project. It extends the JDK Exception class by requesting its invokers to provide an error code when
building its instances. The code is one value of ProtocolErrorCode enum; the code is used to document the possible error conditions generated by the platform as well as to identify the localized
exception messages to be reported. Exceptions messages are stored in the ProtocolExceptionMessagesBundle Properties Bundle and they are keyed on the exception code.
- See Also:
- Serialized Form
m_code
protected ModbusProtocolErrorCode m_code
ModbusProtocolException
public ModbusProtocolException(ModbusProtocolErrorCode code)
- Builds a new EdcException instance based on the supplied EdcErrorCode.
- Parameters:
code
- t
- arguments
-
ModbusProtocolException
public ModbusProtocolException(ModbusProtocolErrorCode code,
String complement)
- Builds a new EdcException instance based on the supplied EdcErrorCode and an optional complement string
- Parameters:
code
- t
- arguments
-
ModbusProtocolException
public ModbusProtocolException(ModbusProtocolErrorCode code,
Throwable cause,
Object... arguments)
- Builds a new EdcException instance based on the supplied EdcErrorCode, an optional Throwable cause, and optional arguments for the associated exception message.
- Parameters:
code
- t
- arguments
-
getCode
public ModbusProtocolErrorCode getCode()
getMessage
public String getMessage()
- Overrides:
getMessage
in class Throwable
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in class Throwable
Copyright © 2013. All Rights Reserved.