Package nxt.peer
Class NetworkMessage.ErrorMessage
java.lang.Object
nxt.peer.NetworkMessage
nxt.peer.NetworkMessage.ErrorMessage
- Enclosing class:
- NetworkMessage
The Error message is returned when a error is detected while processing a
request. No error is returned for messages that do not have a response.
The message identifier is obtained from the request message.
- Message identifier (long)
- Error severity (boolean)
- Error name (string)
- Error message (string)
-
Nested Class Summary
Nested classes/interfaces inherited from class nxt.peer.NetworkMessage
NetworkMessage.AddPeersMessage, NetworkMessage.BlockchainStateMessage, NetworkMessage.BlockIdsMessage, NetworkMessage.BlockInventoryMessage, NetworkMessage.BlocksMessage, NetworkMessage.BundlerRateMessage, NetworkMessage.CumulativeDifficultyMessage, NetworkMessage.ErrorMessage, NetworkMessage.GetBlockMessage, NetworkMessage.GetCumulativeDifficultyMessage, NetworkMessage.GetInfoMessage, NetworkMessage.GetMilestoneBlockIdsMessage, NetworkMessage.GetNextBlockIdsMessage, NetworkMessage.GetNextBlocksMessage, NetworkMessage.GetPeersMessage, NetworkMessage.GetTransactionsMessage, NetworkMessage.GetUnconfirmedTransactionsMessage, NetworkMessage.MilestoneBlockIdsMessage, NetworkMessage.TransactionsInventoryMessage, NetworkMessage.TransactionsMessage -
Field Summary
Fields inherited from class nxt.peer.NetworkMessage
MAX_ARRAY_LENGTH, MAX_LIST_SIZE, MAX_LIST_SIZE_PRE_2_3_3, messageId -
Constructor Summary
ConstructorsConstructorDescriptionErrorMessage(long messageId, boolean severeError, String errorName, String errorMessage) Construct an Error message -
Method Summary
Modifier and TypeMethodDescriptionprotected NetworkMessageconstructMessage(ByteBuffer bytes) Construct the message from the message bytesGet the error messageGet the error namebooleanCheck if this is a severe error
-
Constructor Details
-
ErrorMessage
Construct an Error message- Parameters:
messageId- Message identifiersevereError- TRUE if this is a severe errorerrorName- Error nameerrorMessage- Error message
-
-
Method Details
-
constructMessage
protected NetworkMessage constructMessage(ByteBuffer bytes) throws BufferOverflowException, BufferUnderflowException, nxt.peer.NetworkException Construct the message from the message bytes- Overrides:
constructMessagein classNetworkMessage- Parameters:
bytes- Message bytes following the message name- Returns:
- Message
- Throws:
BufferOverflowException- Message buffer is too smallBufferUnderflowException- Message is too shortnxt.peer.NetworkException- Message is not valid
-
isSevereError
public boolean isSevereError()Check if this is a severe error- Returns:
- TRUE if this is a severe error
-
getErrorName
Get the error name- Returns:
- Error name
-
getErrorMessage
Get the error message- Returns:
- Error Message
-