# IGitConsensusErrors

Matt Stam (@mattstam)

IGitConsensusErrors

The interface for the errors that may be thrown from Git Consensus.

# Errors

# CommitMsgNeedsAddr

error CommitMsgNeedsAddr(string message)

When commit message does not contain a valid address.

Can occur with addCommit(). Specifically occurs when the message does not contain 0x followed by enough length for an address (40 hex characters).

# Parameters

Name Type Description
message string The commit message string.

# DistributionLengthMismatch

error DistributionLengthMismatch(uint256 hashesLen, uint256 valuesLen)

When distribution hashes/owner array length and values array length do not match.

Can occur with addRelease().

# Parameters

Name Type Description
hashesLen uint256 The length of the hashes array.
valuesLen uint256 The length of the values array.

# SubstringOutOfBounds

error SubstringOutOfBounds(uint256 offset, uint256 substringLen, uint256 stringLen)

When the sender attempts to extract a substring that is out of bounds in a string.

Can occur with addCommit() or addRelease().

# Parameters

Name Type Description
offset uint256 The index of the substring to extract.
substringLen uint256 The length of the substring to extract.
stringLen uint256 The length of the string from which to extract the substring.

# TagMsgNeedsAddr

error TagMsgNeedsAddr(string message)

When tag message does not contain a valid address.

Can occur with addRelease(). Specifically occurs when the message does not contain 0x followed by enough length for an address (40 hex characters).

# Parameters

Name Type Description
message string The tag message string.

# UnauthorizedRelease

error UnauthorizedRelease(address senderAddr, address expectedAddr)

When a release attempt occurs from a sender other than the project's governor.

Can occur with addRelease().

# Parameters

Name Type Description
senderAddr address The address of the unauthorized sender.
expectedAddr address The expected address, which should be the governor.