API Documentation for: 1.1.1
Show:

UserError Class

Extends CanteenError
Namespace: Canteen\Errors

A user-facing error, such as a form, privilege or validation error.
Located in the namespace Canteen\Errors.

Constructor

UserError

(
  • code
  • [data='']
)

Parameters:

  • code Int

    The error code

  • [data=''] String | Array optional

    The optional data associated with this error

Item Index

Properties

Methods

__toString

() String

Create a simple to string method since users will see theses

Returns:

String:

The string representation of this Error

getResult

() Dictionary

Inherited from CanteenError:

Get the result object

Returns:

Dictionary:

The result Exception object formatted nicely

Properties

INSUFFICIENT_PRIVILEGE

Int final static

The user doesn't have sufficient privileges to perform action

INVALID_DATA

Int final static

Validating a property data

INVALID_DATA_SET

Int final static

Validating a property against a set of options

INVALID_MYSQL_DATE

Int final static

The supplied data is invalidly formatted for MySQL

messages

Dictionary private final static

The collection of error messages