errors

package
v0.0.0-...-72a5972 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseError

type DatabaseError struct {
	// contains filtered or unexported fields
}

DatabaseError represents errors occurred working with the database or data that may be stored in the database.

func NewDeleteFailed

func NewDeleteFailed(modelName string, id int, rowsAffected int64) *DatabaseError

NewDeleteFailed is an error to throw when deleting a row fails.

func NewModelHasID

func NewModelHasID(modelName string, id int) *DatabaseError

NewModelHasID occurs when a model is expected to have no ID but one is found.

func NewRequiredFieldIsEmpty

func NewRequiredFieldIsEmpty(modelName, fieldName string) *DatabaseError

NewRequiredFieldIsEmpty when a model's field must be set.

type GeneralError

type GeneralError struct {
	// contains filtered or unexported fields
}

GeneralError represents simple, application-wide errors.

func NewFieldIsNil

func NewFieldIsNil(fieldName string) *GeneralError

NewFieldIsNil creates an error when a field with an expected value is nil.

type InvalidMessage

type InvalidMessage struct {
	// contains filtered or unexported fields
}

InvalidMessage represents error states when there is a problem with the message sent from a client to the server.

func NewInvalidClientMessageID

func NewInvalidClientMessageID(expectedID, actualID int) *InvalidMessage

NewInvalidClientMessageID is an error that's displayed when a client message ID is invalid.

func NewInvalidServerMessageID

func NewInvalidServerMessageID(expectedStartID, expectedEndID, actualID int) *InvalidMessage

NewInvalidServerMessageID occurs when the message's server ID is not the latest server message ID or within the range of outgoing message IDs.

type InvalidOperation

type InvalidOperation struct {
	// contains filtered or unexported fields
}

InvalidOperation represents error states when there is a problem when interacting with or applying an operation.

func NewNoValue

func NewNoValue() *InvalidOperation

NewNoValue is an error that occurs when trying to access the value of an operation that shouldn't have a value.

func NewNonExistentPosition

func NewNonExistentPosition(expectedMax, actual int) *InvalidOperation

NewNonExistentPosition is an error that occurs when attempting to modify a document at a position that doesn't exist.

Jump to

Keyboard shortcuts

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