Namespace: Errors

capsula.Errors

A collection of ErrorMessage objects to use in appropriate erroneous situations.
Since:
  • 0.1.0
Source:

Members

(static) ABSTRACT_INSTANTIATION

Usage: when there is an attempt to instantiate an abstract capsule. Error message (with the error code):

'Oops! Abstract capsules cannot be instantiated. Make sure you instantiate the right one. (#300)'

Source:

(static) CAPSULE_ALREADY_ATTACHED

Usage: when trying to attach already attached capsule. Error message (without $1 placeholder replaced and with the error code):

'Oops! Capsule $1 has already been attached in a different context. Make sure you detach it there before attaching it again. (#301)'

Source:

(static) DEFAULT_NOT_FOUND

Usage: When using capsule that has no default property in place where this is required. Error message (without $1 placeholder replaced and with the error code):

'Oops! Default $1 could not be found. (#302)'

Source:

(static) DUPLICATE_NAME

Usage: when the given name has already been occupied. Error message (without $1 placeholder replaced and with the error code):

'Oops! Duplicate name found: $1. Make sure operations, methods, hooks, loops, parts, and data all have unique names (inherited ones included). (#204)'

Source:

(static) ELEMENT_NOT_FOUND

Usage: when specified element (like operation, method, hook, or loop) does not exist. Error message (without $1 and $2 placeholders replaced and with the error code):

'Oops! $1 could not be found among $2. (#201)'

Source:

(static) ERROR

Usage: when somthing really bad happens. Error message (without $1 placeholder replaced and with the error code):

'Oops! Something went wrong unexpectedly. Have you been monkeying with capsules' internal structures / mechnisms? If not, please let us know about this (and don't forget the stack trace). Thank you. $1 (#666)'

Source:

(static) FORBIDDEN_NAME

Usage: when the given name breaks the naming rules (i.e. contains dots or separators). Error message (without $1 placeholder replaced and with the error code):

'Oops! Make sure $1 contains neither :: nor dot. (#203)'

Source:

(static) ILLEGAL_ARGUMENT

Usage: when function argument is not according to expectations. Error message (without $1 placeholder replaced and with the error code):

'Oops! Illegal argument(s). $1 (#200)'

Source:

(static) ILLEGAL_FILTERS_RETURN_VALUE

Usage: when a filter does not return a proper value. Error message (with the error code):

'Oops! Make sure filter returns an array or the STOP message. (#205)'

Source:

(static) ILLEGAL_METHODS_VISIBILITY

Usage: when visibility of a method is changed in a subclass (subcapsule). Error message (without $1 and $2 placeholders replaced and with the error code):

'Oops! Changing inherited method's visibility is not allowed. Make sure the visibility of method $1 is $2. (#207)'

Source:

(static) ILLEGAL_OPERATION_TYPE

Usage: when input operation is used in context where output is expected or vice versa. Error message (without $1 and $2 placeholders replaced and with the error code):

'Oops! Operation $1 cannot act as a $2 in this context. Make sure you pick the one that can. (#400)'

Source:

(static) INDEX_OUT_OF_BOUNDS

Usage: when there is an attempt to access a collection outside of its bounds. Error message (without $1, $2, and $3 placeholders replaced and with the error code):

'Oops! $1 value of $2 exceeded the bounds: 0, $3. (#202)'

Error message example (with placeholders replaced and with the error code):

'Oops! 'at' value of 7 exceeded the bounds: 0, 5. (#202)'

Source:

(static) OUT_OF_CONTEXT

Usage: when there is an illegal attempt to break the boundaries of the current context. Error message (with the error code):

'Oops! Make sure you do this in the right context. (#100)'

Source:

(static) TIE_INCOMPATIBILITY

Usage: when incompatible hooks and/or loops are being tied (for example tying two hooks of sibling capsules). Error message (without $1 and $2 placeholders replaced and with the error code):

'Oops! The pair $1 and $2 is incompatible in the current context. Make sure you tie compatible hooks/loops. (#500)'

Source:

(static) WIRE_INCOMPATIBILITY

Usage: when operations of incompatible types are being wired (for example wiring two output operations of sibling capsules). Error message (without $1 and $2 placeholders replaced and with the error code):

'Oops! The pair $1 and $2 is incompatible in the current context. Make sure you wire compatible operations. (#401)'

Source: