fault

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2016 License: ISC Imports: 4 Imported by: 5

Documentation

Overview

error instances

Provides a single instance of errors to allow easy comparison

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyInitialised      = ExistsError("already initialised")
	ErrAssetsAlreadyRegistered = InvalidError("assets already registered")
	ErrAssetNotFound           = NotFoundError("asset not found")
	//ErrBlockHashDoesNotMeetDifficulty = InvalidError("block hash does not meet difficulty")
	ErrBlockNotFound                = NotFoundError("block not found")
	ErrCannotDecodeAccount          = RecordError("cannot decode account")
	ErrCertificateFileAlreadyExists = ExistsError("certificate file already exists")
	//ErrCertificateNotFound            = NotFoundError("certificate not found")
	ErrChecksumMismatch = ProcessError("checksum mismatch")
	//ErrCountMismatch                  = ProcessError("count mismatch")
	ErrConnectingToSelfForbidden = ProcessError("connecting to self forbidden")
	//ErrCurrencyTooLong                = LengthError("currency too long")
	ErrDescriptionTooLong    = LengthError("description too long")
	ErrDoubleTransferAttempt = InvalidError("double transfer attempt")
	ErrFingerprintTooLong    = LengthError("fingerprint too long")
	//ErrFirstTransactionIsNotBase      = RecordError("first transaction is not base")
	//ErrInsufficientPayment            = InvalidError("insufficient payment")
	ErrInitialisationFailed = InvalidError("initialisation failed")
	ErrIncorrectChain       = InvalidError("incorrect chain")
	//ErrInvalidBitmarkDataRevision     = InvalidError("invalid bitmark data revision")
	//ErrInvalidBitmarkDataSize         = InvalidError("bitmark data size")
	//ErrInvalidBlock                   = InvalidError("invalid block")
	ErrInvalidBlockHeader       = InvalidError("invalid block header")
	ErrInvalidChain             = InvalidError("invalid chain")
	ErrInvalidCount             = InvalidError("invalid count")
	ErrInvalidCurrency          = InvalidError("invalid currency")
	ErrInvalidCursor            = InvalidError("invalid cursor")
	ErrInvalidIPAddress         = InvalidError("invalid IP Address")
	ErrInvalidFingerprint       = InvalidError("invalid fingerprint")
	ErrInvalidPeerResponse      = InvalidError("invalid peer response")
	ErrInvalidPrivateKeyFile    = InvalidError("invalid private key file")
	ErrInvalidPublicKeyFile     = InvalidError("invalid public key file")
	ErrInvalidPublicKey         = InvalidError("invalid public key")
	ErrInvalidKeyLength         = InvalidError("invalid key length")
	ErrInvalidKeyType           = InvalidError("invalid key type")
	ErrInvalidLength            = InvalidError("invalid length")
	ErrInvalidLoggerChannel     = InvalidError("invalid logger channel")
	ErrInvalidOwnerOrRegistrant = InvalidError("invalid owner or registrant")
	ErrInvalidPortNumber        = InvalidError("invalid port number")
	ErrInvalidNonce             = InvalidError("invalid nonce")
	ErrInvalidSignature         = InvalidError("invalid signature")
	ErrInvalidStructPointer     = InvalidError("invalid struct pointer")
	//ErrInvalidTransactionChain        = InvalidError("invalid transaction chain")
	ErrInvalidDnsTxtRecord = InvalidError("invalid dns txt record")
	//ErrInvalidType                    = InvalidError("invalid type")
	ErrInvalidVersion       = InvalidError("invalid version")
	ErrKeyFileAlreadyExists = ExistsError("key file already exists")
	ErrKeyFileNotFound      = NotFoundError("key file not found")
	//ErrKeyNotFound                    = NotFoundError("key not found")
	//ErrLinkNotFound                   = NotFoundError("link not found")
	ErrLinkToInvalidOrUnconfirmedTransaction = InvalidError("link to invalid or unconfirmed transaction")
	ErrMerkleRootDoesNotMatch                = InvalidError("Merkle Root Does Not Match")
	//ErrMessagingTerminated            = ProcessError("messaging terminated")
	ErrMissingParameters      = LengthError("missing parameters")
	ErrNameTooLong            = LengthError("name too long")
	ErrNoConnectionsAvailable = InvalidError("no connections available")
	ErrNoNewTransactions      = InvalidError("no new transactions")
	//ErrNoPaymentToMiner               = InvalidError("no payment to miner")
	//ErrNotABitmarkPayment             = InvalidError("not a bitmark payment")
	ErrNotAvailableDuringSynchronise = InvalidError("not available during synchronise")
	ErrNotAssetIndex                 = RecordError("not asset index")
	ErrNotConnected                  = NotFoundError("not connected")
	//ErrNotCurrentOwner                = RecordError("not current owner")
	ErrNotInitialised = NotFoundError("not initialised")
	ErrNotLink        = RecordError("not link")
	ErrNotAPayId      = InvalidError("not a pay id")
	ErrNotAPayNonce   = InvalidError("not a pay nonce")
	ErrNotPublicKey   = RecordError("not public key")
	//ErrNotTransactionType             = RecordError("not transaction type")
	ErrNotTransactionPack = RecordError("not transaction pack")
	//ErrPaymentAddressMissing          = NotFoundError("payment address missing")
	ErrPayIdAlreadyUsed      = InvalidError("payId alread used")
	ErrPaymentAddressTooLong = LengthError("payment address too long")
	////ErrPeerAlreadyExists              = ExistsError("peer already exists")
	////ErrPeerNotFound                   = NotFoundError("peer not found")
	ErrPreviousBlockDigestDoesNotMatch = InvalidError("previous block digest does not match")
	ErrReceiptTooLong                  = LengthError("receipt too long")
	ErrSignatureTooLong                = LengthError("signature too long")
	ErrTooManyItemsToProcess           = LengthError("too many items to process")
	////ErrTooManyTransactionsInBlock     = LengthError("too many transactions in block")
	ErrTransactionAlreadyExists  = ExistsError("transaction already exists")
	ErrTransactionIsNotAnAsset   = InvalidError("transaction is not an asset")
	ErrTransactionIsNotAnIssue   = InvalidError("transaction is not an issue")
	ErrTransactionIsNotATransfer = InvalidError("transaction is not a transfer")
	ErrWrongNetworkForPublicKey  = InvalidError("wrong network for public key")
)

common errors - keep in alphabetic order

Functions

func Critical

func Critical(message string)

Log a simple string

func Criticalf

func Criticalf(format string, arguments ...interface{})

Log a formatted string with arguments like fmt.Sprintf()

func Finalise

func Finalise()

flush any data

func Initialise

func Initialise() error

setup a log channel for last attempt to log something

func IsErrExists

func IsErrExists(e error) bool

determine the class of an error

func IsErrInvalid

func IsErrInvalid(e error) bool

func IsErrLength

func IsErrLength(e error) bool

func IsErrNotFound

func IsErrNotFound(e error) bool

func IsErrProcess

func IsErrProcess(e error) bool

func IsErrRecord

func IsErrRecord(e error) bool

func Panic

func Panic(message string)

final panic

func PanicIfError

func PanicIfError(message string, err error)

conditional panic

func PanicWithError

func PanicWithError(message string, err error)

final panic

func Panicf

func Panicf(format string, arguments ...interface{})

Panic with a formatted message a formatted string with arguments like fmt.Sprintf()

Types

type ExistsError

type ExistsError GenericError

to allow for different classes of errors

func (ExistsError) Error

func (e ExistsError) Error() string

the error interface methods

type GenericError

type GenericError string

error base

func (GenericError) Error

func (e GenericError) Error() string

the error interface base method

type InvalidError

type InvalidError GenericError

func (InvalidError) Error

func (e InvalidError) Error() string

type LengthError

type LengthError GenericError

func (LengthError) Error

func (e LengthError) Error() string

type NotFoundError

type NotFoundError GenericError

func (NotFoundError) Error

func (e NotFoundError) Error() string

type ProcessError

type ProcessError GenericError

func (ProcessError) Error

func (e ProcessError) Error() string

type RecordError

type RecordError GenericError

func (RecordError) Error

func (e RecordError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL